Toggle Sidebar B
AppearanceLight & dark mode D

Click Spark

Creates particle spark bursts at click position.

Default

Click anywhere in the box. Wrap any content in ClickSpark and every click inside it throws a burst of sparks.

Dark previewReplay previewOpen in new tab

Click Around!

Customize

Spark Color
Spark Size10
Spark Radius15
Spark Count8
Duration400ms
Extra Scale1

API Reference

ClickSpark

PropTypeDefaultDescription
sparkColorstring"#fff"Color of each spark line.
sparkSizenumber10Initial length of each spark line.
sparkRadiusnumber15How far sparks travel from the click center.
sparkCountnumber8Number of spark lines that appear on each click.
durationnumber400Animation duration in milliseconds.
easingstring"ease-out"Easing function used for the spark animation. One of linear, ease-in, ease-in-out or ease-out.
extraScalenumber1Additional multiplier for spark distance.

Slots

PropTypeDefaultDescription
defaultslot-Content the sparks are drawn over. The original takes it as children.

Accessibility

Keyboard shortcuts and ARIA behavior.

  • The canvas is purely decorative and ignores pointer events, so it never blocks the content underneath.
  • Sparks only follow mouse and touch clicks. Keyboard activation does not produce them.