Cycles through a list of items with an enter/exit animation, powered by Motion.
Made by Sora UIInstallation
File Structure
Usage
Pause cycling and drive the index manually:
Props
| Prop | Type | Default |
|---|---|---|
children | ReactNode[] | - |
interval? | number | 2 |
trigger? | boolean | true |
mode? | "sync" | "wait" | "popLayout" | "popLayout" |
live? | "off" | "polite" | "assertive" | "off" |
variants? | Variants | - |
transition? | Transition | - |
onIndexChange? | (index: number) => void | - |
className? | string | - |
When to Use
Use TextLoop for short rotating copy where a hard cut would feel abrupt: hero headlines, rotating value props, or status text that changes over time. Keep items short and similar in width, since the container does not reserve space for the widest item.
Accessibility
Set live="polite" if the cycling text conveys information users should be notified of; leave it "off" (default) for purely decorative rotating copy, since a live region firing every interval seconds is disruptive for screen reader users. When prefers-reduced-motion: reduce is set, the component still swaps the active item on each interval but skips the enter/exit motion via useReducedMotion() — no extra configuration needed.
Credits
Inspired by motion-primitives.
Built by Axyl. A motion-first component registry for React.
Last updated: 7/12/2026