Scroll words
A paragraph that brightens word by word as it is scrolled through, so a statement is read at the pace of the scroll. Scrolling back dims it again.
When to use
- One strong statement on a landing or about page.
- Story pages where the next sentence should wait for the reader.
When not to use
- Body copy, instructions and anything people must read before acting.
- More than two or three on a page.
Installation
terminal
pnpm dlx shadcn@latest add @caliper/scroll-words
Adds its 3 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
ScrollWords
3 props
Also accepts the native props of its root element and a ref.
PropTypeDefaultDescription
children *string—
as"div" | "h2" | "h3" | "p""p"
dimnumber0.18Opacity of words not yet reached, 0 to 1.
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It is built on native elements, so roles and focus come from the browser.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/scroll-words.mdThe index of every part is at /llms.txt.
More in Text motion
Text motionText reveals, morphs and shimmer.Scroll storySections that change as you scroll.Reading progressWhere you are in a long page, in a small pill that appears once you start scrolling: a ring that fills as you read, the section you are in and how far through you are. Press it to jump to another section.