Skip to content

Text Curtain

Lines rise through invisible masks with a measured editorial reveal.

LIVE PREVIEWInteract with the component
Just React. No extra dependencies.

Copy the component and its CSS module into your project.

CSS Modules

Usage

Matches your current playground settings.

jsx
import TextCurtain from "./TextCurtain";
export default function Example() {
return (
<TextCurtain
text={"A little less.\nA little better."}
revealed={true}
duration={1000}
stagger={170}
color={"#e8d8c2"}
style={{
"fontSize": 54
}}
/>
);
}

Using Text Curtain

Separate the text into lines with newline characters. duration sets the reveal time and stagger separates the line starts.

Toggle revealed to show or hide the lines. Use the effect for a short editorial heading whose line breaks suit the available width.

Props

NameTypeRequiredDefaultDescription
textstringNo""Your text, with each newline starting a separate reveal line.
revealedbooleanNotrueShow the lines. Toggle this prop to play or reverse the reveal; initial mount also reveals.
durationnumberNo850Transition duration in milliseconds.
staggernumberNo130Delay between lines in milliseconds.
colorstringNo"currentColor"Text colour.
classNamestringNo""Additional classes for the root element.
styleCSSPropertiesNoundefinedInline styles for caller-defined size, typography, and appearance.

Related components

Reflection Text

Text Effects

Crisp typography meets a soft, fading reflection beneath the baseline.

Morphing Words

Text Effects

Words dissolve through a soft blur while the headline keeps its width.

Dot Matrix Text

Text Effects

Amber pinpoints form a crisp matrix display with a soft travelling pulse.

Scan Text

Text Effects

A warm scanning light brings a dim headline into focus.