Modus UI

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.

Modus / Ash Spiral

Installation

CLI

npx @modus-ui/cli add ash-spiral

Manual

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

Usage

tsx
import { AshSpiral } from "@/components/ui/ash-spiral";

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

Props

PropTypeDefaultDescription
huenumber0Hue rotation in degrees (-180 to 180).
saturationnumber1Saturation multiplier (0 to 2).
brightnessnumber1Brightness multiplier (0.35 to 1.65).
emberColorstringtheme primary, shiftedColour of the outer, cooling sparks.
heatColorstringtheme primaryColour of the hot, inner sparks.
coreColorstringtheme highlightColour of the bright spiral core.
backgroundColorstring"hsl(var(--background))"Colour behind the spiral.

Comments

  • No comments yet.