This component requires the
runed and motion-sv dependencies.Installation
Usage
Examples
Blur In Animation
Animate text with a blur and fade effect.Slide Up by Word
Animate each word sliding up from below.Scale Up by Character
Animate each character with a scale-up effect.Slide Left by Character
Animate characters sliding in from the right.Fade In by Line
Animate text line by line with fade in effect.Custom Variants
Use custom motion variants for complete control.Props
The text content to animate.
The animation preset to use. Options:
fadeIn, blurIn, blurInUp, blurInDown, slideUp, slideDown, slideLeft, slideRight, scaleUp, scaleDown.How to split the text for animation. Options:
text (entire text), word, character, line.Additional CSS classes to apply to the component container.
CSS classes to apply to each animated segment (word/character/line).
The delay in seconds before the animation starts.
The total duration in seconds for the entire animation sequence.
Custom motion variants for the animation. When provided, overrides the
animation preset.Whether to start animation when the component enters the viewport.
Whether to animate only once (when used with
startOnView).Whether to enable accessibility features (screen reader support).
Animation Variants
The component includes several built-in animation presets:- fadeIn: Simple fade in with slight upward movement
- blurIn: Blur to clear transition
- blurInUp: Blur with upward slide
- blurInDown: Blur with downward slide
- slideUp: Slide up from below
- slideDown: Slide down from above
- slideLeft: Slide in from the right
- slideRight: Slide in from the left
- scaleUp: Scale up from small
- scaleDown: Scale down from large
Customization
Stagger Timing
The component automatically adjusts stagger timing based on the split type:- Text: 0.06s
- Word: 0.05s
- Character: 0.03s
- Line: 0.06s
Styling
The component uses Tailwind CSS classes and can be styled using theclass and segmentClass props:
For line-based animations, use
\n or \\n to separate lines in the content string.