Scroll Text Fill
A large editorial statement whose words light up one by one as you scroll, each rising a few pixels into place; accent words get a sweeping underline. The full sentence is exposed to screen readers from the start.
Try it: Scroll — the sentence fills in word by word.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/scroll-text-fill.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/scroll-text-fill. You can also copy the source into components/ui/scroll-text-fill.tsx (view on GitHub).
Usage
import { ScrollTextFill } from '@/components/ui/scroll-text-fill'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
text | string | sample statement | The statement. Wrap words in [[double brackets]] for the accent treatment. |
scrollContainer | RefObject<HTMLElement> | — | Scrolling element (defaults to the window). |
className | string | — | Extra classes merged onto the paragraph. |
Dependencies
motion
Related Text Animations components
- Charm Text
A sentence with a few enchanted words. Hover, focus or tap one and it recolours, draws an underline and a tiny glyph pops out on a spring; click pins it on. A chip variant sets glyph pills inline…
- Infinite Marquee
Seamless looping strip with masked edge fades; pauses on hover, focus or with an optional pause button. Wraps statically under reduced motion.
- Word Cycle Text
A headline whose key word keeps changing its mind: each word rises letter by letter out of a soft blur inside a tinted capsule that resizes on a spring while the line glides to make room.
- Number Ticker
Counts to a value when scrolled into view with locale-aware grouping and tabular figures; re-animates from the current value when it changes.
- Highlight Marker Text
Editorial copy annotated by hand: as it scrolls into view a marker sweeps behind one phrase, an underline draws under the next, a pen circle loops another and a strike crosses one out, in sequence.…
- Typewriter
Types and deletes through phrases.