Cinderfall
A cursor spark trail: stardust sheds off the pointer white, falls under gravity while dimming through silver to a transparent fade, and fast strokes throw proportionally more — with the occasional heavy spark that bounces once on an invisible floor. Scoped to its container by default, idles on its own when untouched, and turns off under reduced motion.
canvaspro
Pro
The preview is live. The source is Pro.
One purchase, lifetime access: every pro component's source, CLI install with your own registry token, and all future drops.
Installation
CLI
npx shadcn@latest add @crucible/cinderfallProps
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | ||
| spawnThreshold | number | 12 | Minimum px the pointer must travel before a new spark sheds — the spawn-distance gate that keeps slow, tiny movements from spamming the trail. Faster strokes cross the gate more often and shed proportionally more sparks. |
| lifetime | number | 1.1 | Mean spark lifetime in seconds (per-spark jittered ±35%). |
| rate | number | 1 | Sparks shed each time the pointer crosses the spawn gate. |
| gravity | number | 950 | Downward acceleration in px/s². |
| colors | [string, string, string, string] | a white → silver stardust ramp; pass warm stops for an ember-style trail | Fade ramp [fresh, bright, dim, faded] — sparks spawn at the first stop and dim through the ramp as they fall while their alpha fades out. |
| heavyChance | number | 0.09 | Chance a spark is a "heavy" ember that bounces once on an invisible floor. |
| heat | number | 1 | 0–1 master energy: spark size, glow, shed rate. |
| global | boolean | Attach to the whole viewport instead of the nearest containing element. Off by default — Cinderfall is scoped to its parent (place it inside a relative container) so it never sheds sparks page-wide unless you explicitly opt in. | |
| paused | boolean | Stop shedding and freeze sparks mid-air. | |
| maxParticles | number | 160 | Hard cap on live sparks; oldest are recycled beyond it. |
| idle | boolean | true | Idle autoplay (scoped mode only): after 1.5s with no pointer in the container, a ghost stroke wanders a seeded Lissajous path — surging and easing so the shed rate breathes — and keeps the stardust falling. A real pointer takes over instantly. Also runs on touch-only devices. Never under reduced motion; sleeps offscreen and when paused. |
Honors prefers-reduced-motion with a designed static fallback, pauses offscreen and on hidden tabs, and passes className through.