Click spark
DarkInspect
A burst of sparks from wherever its content is pressed: a mouse press, a tap, or a key on a control inside it. The default is ours, the umlaut: each spark is the logo's two dots, flying out side by side in its green. Colours may be Cüte's tokens, read from the CSS at each burst. Reduced motion keeps a short, still burst.
Examples
Shapes
The umlaut, a dot, a line, a streak with a fading tail, and a twinkling star.
DarkInspect
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| shape | "umlaut" | "dot" | "line" | "streak" | "star" | "umlaut" | Each spark's look; the umlaut is the logo's pair of dots. |
| sparkColor | string | string[] | "var(--color-brand-green)" | A colour, or a list mixed through each burst. Tokens work. |
| sparkCount | number | 8 | Sparks in each burst. |
| sparkRadius | number | 30 | How far they travel from the press, in px. |
| sparkSize | number | 14 | Each spark's length, in px. |
| sparkWidth | number | 2 | Each spark's thickness, in px; a dot's radius follows it. |
| duration | number | 500 | A burst's length, in ms. |
| easing | "ease-out" | "ease-in-out" | "ease-in" | "linear" | "spring" | "ease-out" | How the sparks slow; spring overshoots a little and settles. |
| randomness | number | 0.2 | Varies each spark's angle, length and speed, 0 to 1. |
| gravity | number | 0 | Pulls the sparks down as they fly, 0 to 2. |
| spread | number | 360 | The angle they fan across, in degrees. |
| direction | number | 0 | Where a partial spread points, in degrees; 0 is up. |
| glow | number | 0 | Soft light round each spark, 0 to 1. |
| ring | boolean | false | A thin ring expanding from the press. |
| layer | "front" | "back" | "front" | Over the content, or behind it so they burst out round it. |
| disabled | boolean | false | Stops new bursts. |
| ref | Ref<{ spark: (x?: number, y?: number) => void }> | — | spark() fires a burst from code, centred without x and y. |