Introducing Motion-Primitives Pro - Advanced components and templates to help you build a website that stands out.

Text Roll

A text roll component that rotates each character, fully customizable for nice text animations.

Examples

Text Roll basic

motion-primitives

Text Roll custom variants

motion-primitives

Text Roll custom transition delay

motion-primitives

Installation

npx shadcn add "https://motion-primitives.com/c/text-roll.json"

Component API

Text Roll

PropTypeDefaultDescription
childrenReact.ReactNode-The text to roll.
classNamestring-The class name to apply to the component.
durationnumber0.5The duration of the animation.
getEnterDelay(i: number) => number(i) => i * 0.1The delay of the animation for each character.
getExitDelay(i: number) => number(i) => i * 0.1 + 0.2The delay of the animation for each character.
transitionTransition{ ease: 'easeIn' }The transition of the animation.
variantsObject-The variants of the animation.
onAnimationComplete() => void-The callback function to call when the animation is complete.