ScrollFillText

Words light up one by one as you scroll past, like ink reaching the page. Text.

Open playground

About

ScrollFillText is a React component in the Text category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { ScrollFillText } from "@ashutoshswamy/smoui" and set text, progress, autoplay.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { ScrollFillText } from "@ashutoshswamy/smoui";

<ScrollFillText className="text-3xl font-semibold" text="Every component earns its place." />

Props 3

text

Text to fill.

string
progress

Controlled 0-1. Without it, scroll position drives the fill.

number
autoplay

For demos: loop the fill on its own.

booleandefault false