Modus UI

Pulse Dust

Web (React)

A grain field on the page's own paper where slow travelling waves swell the dots, with rare accent grains in the theme primary.

A grain field on the page's own paper where slow travelling waves swell the dots, with rare accent grains in the theme primary. 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 / Pulse Dust

Installation

CLI

npx @modus-ui/cli add pulse-dust

Manual

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

Usage

tsx
import { PulseDust } from "@/components/ui/pulse-dust";

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

Props

PropTypeDefaultDescription
speednumber0.8Animation speed multiplier.
sizenumber1.15Grain radius multiplier.
lengthnumber0.75Grid density; higher values tighten the spacing.
opacitynumber1Canvas opacity.
huenumber0Hue rotation in degrees.
saturationnumber1Saturation multiplier.
brightnessnumber1Brightness multiplier.
dotColorstringtheme foregroundColour of the regular grains.
highlightColors[string, string]theme primary and muted foregroundColours of the rare accent grains.
backgroundColorstringtheme backgroundBackground colour.

Comments

  • No comments yet.