Modus UI

Erosion Plate

Web (React)

A matted image plate that erodes under turbulence as the cursor moves.

Erosion Plate sets an image inside a bordered paper mat and follows the cursor with a gentle drift. The faster the pointer travels, the harder an feTurbulence displacement erodes the picture. Caption text sits on a theme-tinted fade.

Plate No. 07

Weathered light

Move the cursor to erode it.

Modus / Erosion Plate

Installation

CLI

npx @modus-ui/cli add erosion-plate

Manual

  1. Copy the code from the component tab.
  2. Create a file at components/ui/erosion-plate.tsx.
  3. Paste the code.

Usage

tsx
import { ErosionPlate } from "@/components/ui/erosion-plate";

export default function Example() {
  return (
    <ErosionPlate image="/your-image.jpg">
      <h2>Hover Me</h2>
    </ErosionPlate>
  );
}

Props

PropTypeDefaultDescription
widthnumber300Card width in pixels.
heightnumber400Card height in pixels.
imagestring"https://images.unsplash.com/photo-1579546929518-9e396f3cc809?q=80&w=600&auto=format&fit=crop"Image URL.
baseFrequencynumber0.022Base frequency of the turbulence filter.
numOctavesnumber3Octaves of the turbulence filter.
seednumber11Seed of the turbulence filter.
maxDisplacementnumber260Maximum displacement of the distortion.
movementBoundnumber50Distance in pixels the card follows the cursor before resisting.

Comments

  • No comments yet.