- Docs
- Components
- Text
- 3D Letter Swap
3D Letter Swap
Staggered customizable 3D letter swap animation
3d-letter-swap-tw
Hover Me!
Customize
Stagger Interval
0.03s
Duration
0.6s
Blur Amount
4px
Scroll Threshold
0.1
Props
17| Name | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | - | The content to be displayed and animated |
as | ElementType | "p" | HTML Tag to render the component as |
className | string | "" | Class name for the main container element |
frontFaceClassName | string | "" | Class name for the front face element |
backFaceClassName | string | "" | Class name for the secondary face element |
staggerInterval | number | 0.05 | Duration of stagger delay between elements in seconds |
staggerOrigin | "first" | "last" | "center" | "random" | number | "first" | Direction to stagger animations from |
animation | ValueAnimationTransition | AnimationOptions | { type: 'spring', damping: 30, stiffness: 300 } | Animation transition configuration |
flipDirection | "top" | "bottom" | "top" | Direction of rotation |
playOnScroll | boolean | false | Trigger animation when element scrolls into view |
scrollThreshold | number | 0.1 | IntersectionObserver threshold for scroll trigger |
blur | boolean | false | Enable blur effect during animation |
blurAmount | number | 4 | Amount of blur in pixels during transition |
duration | number | 0.6 | Duration of the animation in seconds |
onAnimationStart | () => void | undefined | Callback fired when animation starts |
onAnimationComplete | () => void | undefined | Callback fired when animation completes |
respectReducedMotion | boolean | true | Honor user's prefers-reduced-motion setting |
childrenReact.ReactNodeThe content to be displayed and animated
Default
-asElementTypeHTML Tag to render the component as
Default
"p"classNamestringClass name for the main container element
Default
""frontFaceClassNamestringClass name for the front face element
Default
""backFaceClassNamestringClass name for the secondary face element
Default
""staggerIntervalnumberDuration of stagger delay between elements in seconds
Default
0.05staggerOrigin"first" | "last" | "center" | "random" | numberDirection to stagger animations from
Default
"first"animationValueAnimationTransition | AnimationOptionsAnimation transition configuration
Default
{ type: 'spring', damping: 30, stiffness: 300 }flipDirection"top" | "bottom"Direction of rotation
Default
"top"playOnScrollbooleanTrigger animation when element scrolls into view
Default
falsescrollThresholdnumberIntersectionObserver threshold for scroll trigger
Default
0.1blurbooleanEnable blur effect during animation
Default
falseblurAmountnumberAmount of blur in pixels during transition
Default
4durationnumberDuration of the animation in seconds
Default
0.6onAnimationStart() => voidCallback fired when animation starts
Default
undefinedonAnimationComplete() => voidCallback fired when animation completes
Default
undefinedrespectReducedMotionbooleanHonor user's prefers-reduced-motion setting
Default
true