SparklesText
Wraps any text or content with randomly repositioning sparkle star particles that animate continuously around it.
import { SparklesText } from "@animui/ui"Basic
Wrap any heading to add the default six sparkles.
Hello, Sparkles!
More sparkles
Increase sparkleCount for a denser, more energetic effect.
More Sparkles!
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Text or content around which sparkles appear. |
sparkleCount | number | 6 | Number of simultaneous sparkle particles. |
colors | string[] | ["#fbbf24","#f59e0b","#fde68a","#fcd34d"] | Pool of colors randomly assigned to sparkles. |
className | string | — | Additional classes. |