TextReveal

Words rise on a spring and unblur one by one when scrolled into view. Text.

Open playground

About

TextReveal 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 { TextReveal } from "@ashutoshswamy/smoui" and set text, stagger, className.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

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

<TextReveal className="text-3xl" text="Calm, crisp and intentional." />

Props 3

text

Text to reveal.

string
stagger

Seconds between words.

numberdefault 0.045
className

Class on the <p>.

string