Modus UI

Dust Veil

Web (React)

A drifting fbm veil of dust in your theme's tones that leans toward the pointer.

A full-bleed fragment shader of warped fbm noise forming a veil of dust with a drifting band of light, coloured from the palette's primary and fading into the page ground. It breathes slowly and drifts toward the pointer. It fills its positioned parent, re-reads the theme when the mode or palette changes, pauses when off screen and stays still when the user prefers reduced motion.

Modus / Dust Veil

Installation

CLI

npx @modus-ui/cli add dust-veil

Manual

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

Usage

tsx
import { DustVeil } from "@/components/ui/dust-veil";

export default function Example() {
  return (
    <div className="relative h-[500px] w-full overflow-hidden">
      <DustVeil />
    </div>
  );
}

Props

PropTypeDefaultDescription
huenumber0Hue rotation in degrees (-180 to 180).
saturationnumber1Saturation multiplier (0 to 2).
brightnessnumber1Brightness multiplier (0.35 to 1.65).
deepColorstringFaint --foreground washColour of the outer veil.
coreColorstringhsl(var(--primary))Colour of the dense core.
glowColorstringWarmer shift of --primaryColour of the drifting band of light.
backgroundColorstringhsl(var(--background))Colour behind the effect.

Comments

  • No comments yet.