Explosion Text
The Explosion Text component creates an animated explosion effect when clicked, where characters scatter and reassemble. Customize the animation speed, color, direction, and more for a unique experience.
Overview
The ExplosionText component creates a fun and engaging animation where each character of the text explodes into particles when clicked. This component is perfect for adding interactive text effects to your project.
You can customize the explosion's duration, color, and direction, creating a dynamic user experience.
Preview
Usage
Code
Examples
duration
The duration is used to explosion animation duration to 1 second for each character.
explosionColor
The explosionColor is used to custom explosion color.
direction
The direction is used to explodes in the bottom direction.
resetDelay
The resetDelay is used to reset delay after explosion effect.
className
The className is used to allowing you to add custom styling to the component.
Props
| Prop | Type | Default |
|---|---|---|
text | string | - |
duration | number | 0.5 |
explosionColor | string | '#ff0000' |
direction | "top" | "bottom" | "left" | "right" | 'top' |
resetDelay | number | 1000 |
className | string | - |
as | ElementType<any, keyof IntrinsicElements> | "span" |