Browse components
Dual Sparks
Two streams of sparks rush in from opposite edges and burst against each other in a glowing core. Canvas 2D.
Dual Sparks
Installation
npx shadcn@latest add @glint-ui/dual-sparksFirst time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glint-ui-seven.vercel.app/r/dual-sparks.json
Usage
import { DualSparks } from "@/components/ui/dual-sparks";
<div className="relative h-96">
<DualSparks leftColor="#38bdf8" rightColor="#f472b6" />
</div>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| leftColor | string | "#38bdf8" | Color of the stream entering from the left. |
| rightColor | string | "#f472b6" | Color of the stream entering from the right. |
| density | number | 90 | Sparks spawned per second on each side. |
| speed | number | 1 | Flow speed multiplier. |
| glow | number | 1 | Brightness of the collision glow. |
| spread | number | 0.5 | How far the streams fan out vertically. |
| className | string | — | Extra classes for the root element. |