Click spark preview

Click spark

Every click throws a short burst of rays from the pointer.

  • Group
    Effects
  • Origin
    Inspired · Original (this library)
  • License
    MIT
  • Added
    Oct 18
npx shadcn@latest add @deank/click-spark

The registry stays private. Install from the repo with a GitHub token — see the README.

Usage

import { ClickSpark } from "@/registry/components/click-spark/click-spark";

<ClickSpark>Label</ClickSpark>

Props

PropTypeDefaultDescription
children?ReactNode
color?string"currentColor"Spark color. Defaults to the current text color.
count?number8Number of rays per click.
radius?number22How far the rays travel, px.
size?number10Ray length, px.
duration?number420Milliseconds per burst.
className?string

When to use

Adding playful feedback to clicks inside a region (a hero, a game, a demo).

When not to use

Forms, dense tools or anywhere repeated clicks happen; it is decoration only.

Related

Button · Reaction bar