Installation
Usage
showLineNumbers
showLineNumbers
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | string | - | The text content to animate (required). |
className | string | - | Additional class names for the component. |
segmentClassName | string | - | Class names applied to each animated segment. |
delay | number | 0 | Delay before animation starts in seconds. |
duration | number | 0.3 | Duration of the animation in seconds. |
variants | Variants | - | Custom motion variants for advanced customization. |
as | ElementType | "p" | The HTML element type to render. |
by | "text" | "word" | "character" | "line" | "word" | How to split the text for animation. |
startOnView | boolean | true | Whether to start animation when entering viewport. |
once | boolean | false | Whether to animate only once. |
animation | "fadeIn" | "blurIn" | "blurInUp" | "blurInDown" | "slideUp" | "slideDown" | "slideLeft" | "slideRight" | "scaleUp" | "scaleDown" | "fadeIn" | The animation preset to use. |
accessible | boolean | true | Whether to enable accessibility features. |
| …rest | MotionProps | - | All motion props are supported. |
Animation Presets
The component includes 10 built-in animation presets:fadeIn- Fade in with slight upward movementblurIn- Blur in effectblurInUp- Blur in with upward movementblurInDown- Blur in with downward movementslideUp- Slide up from belowslideDown- Slide down from aboveslideLeft- Slide in from rightslideRight- Slide in from leftscaleUp- Scale up from smallscaleDown- Scale down from large
Examples
Animate by Character
showLineNumbers
Blur Effect
showLineNumbers
Custom Element Type
showLineNumbers
Animate by Line
showLineNumbers
With Custom Variants
showLineNumbers