Text loop
One word in a sentence that cycles through a few options. The widest word reserves the space, it pauses on hover, focus, off screen and in a hidden tab, and a pause button stops it.
Close the books faster, with fewer errors, from anywhere
Ask about revenue, churn, refunds, pipeline in plain words.
When to use
- A marketing headline with three or four audiences or outcomes.
- An empty state that hints at what you can ask.
When not to use
- Information people need to read; every option must also make sense alone.
- Product UI and controls; keep labels still.
Installation
pnpm dlx shadcn@latest add @caliper/text-loop
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
TextLoop
5 props
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It is built on native elements and keeps aria-hidden, aria-label and aria-pressed in step with state.
Motion
- State changes animate with the library's shared durations and curves, so its timing matches every other part.
- Under reduced motion each change lands on its end state without movement; nothing is hidden or skipped.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/text-loop.mdThe index of every part is at /llms.txt.