Ash Spiral
Web (React)
A drifting spiral of 12,000 sparks drawn in your theme's ink, set off-centre.
A Three.js point spiral of 12,000 sparks winding into an off-centre core. Spark colours are derived from the theme's primary hue: on a dark background they glow with additive light, on paper they settle as soft ink, and they follow the palette picker. Rendered at half resolution, it fills its positioned parent, pauses when off screen and renders a still frame when the user prefers reduced motion.
Installation
CLI
npx @modus-ui/cli add ash-spiralManual
- Install
three. - Copy the code from the component tab.
- Create a file at
components/ui/ash-spiral.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). |
emberColor | string | theme primary, shifted | Colour of the outer, cooling sparks. |
heatColor | string | theme primary | Colour of the hot, inner sparks. |
coreColor | string | theme highlight | Colour of the bright spiral core. |
backgroundColor | string | "hsl(var(--background))" | Colour behind the spiral. |
Comments