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.
Installation
CLI
npx @modus-ui/cli add dust-veilManual
- Install
three. - Copy the code from the component tab.
- Create a file at
components/ui/dust-veil.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
hue | number | 0 | Hue rotation in degrees (-180 to 180). |
saturation | number | 1 | Saturation multiplier (0 to 2). |
brightness | number | 1 | Brightness multiplier (0.35 to 1.65). |
deepColor | string | Faint --foreground wash | Colour of the outer veil. |
coreColor | string | hsl(var(--primary)) | Colour of the dense core. |
glowColor | string | Warmer shift of --primary | Colour of the drifting band of light. |
backgroundColor | string | hsl(var(--background)) | Colour behind the effect. |
Comments