Modus UI

Resonance Plate

Web (React)

Chladni-style nodal lines shimmering across an off-centre plate, with drifting motes, in theme ink.

A WebGL shader draws the shifting nodal lines of a vibrating plate set off to the right, leaving the left side calm for copy. Nodal lines take the muted ink, antinodes and the periodic strike ring take the primary, and a few motes drift upward. Click to strike it. It fills its positioned parent, follows the active theme and palette in light and dark mode, pauses when off screen and renders a still frame when the user prefers reduced motion.

Modus / Resonance Plate

Installation

CLI

npx @modus-ui/cli add resonance-plate

Manual

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

Usage

tsx
import { ResonancePlate } from "@/components/ui/resonance-plate";

export default function Example() {
  return (
    <div className="relative h-[500px] w-full overflow-hidden">
      <ResonancePlate />
      <div className="relative z-10 p-8">
        <h1>Content over the background</h1>
      </div>
    </div>
  );
}

Props

PropTypeDefaultDescription
speednumber1Animation speed multiplier.
pointerAmountnumber1How far the pattern follows the pointer.
strikeDurationnumber2400Milliseconds a strike's ring takes to fade.
emberAmountnumber1Share of the 58 drifting motes to draw (0 to 1).
brightnessnumber1CSS brightness filter.
opacitynumber1Overall opacity.
huenumber0Hue rotation in degrees.
saturationnumber1CSS saturation filter.
backgroundColorstringundefinedCSS background. Defaults to the theme background.
colorsstring[]undefinedHex overrides for deep, node, antinode and highlight. Defaults to theme tokens.
emberColorsstring[]undefinedHex overrides for hot and cool motes. Defaults to theme tokens.

Comments

  • No comments yet.