Text Reveal

Masked line, word or letter reveals powered by GSAP SplitText.

gsap@gsap/reactMIT · free

Motion that makes your site feel alive.

Every word arrives a beat after the last, softly coming into focus.

Installation

npx shadcn@latest add https://ombakui.com/r/text-reveal.json

Usage

import { TextReveal } from "@/components/text-reveal";

<TextReveal as="h1" split="lines">
  Motion that makes your site feel alive.
</TextReveal>

<TextReveal split="words" blur>Softly, one word at a time.</TextReveal>
<TextReveal split="chars" trigger="load">Hello</TextReveal>

Props

PropTypeDefaultDescription
children*ReactNode–
asElementType"h2"HTML tag to render.
split"lines" | "words" | "chars""lines"Split into lines, words or characters.
trigger"scroll" | "load""scroll""scroll" plays when the text enters the viewport, "load" plays on mount.
durationnumber1Seconds per piece.
staggernumberdepends on splitSeconds between pieces.
delaynumber0Seconds before starting.
blurbooleanfalseBlur-to-sharp while revealing.
startstring"top 85%"ScrollTrigger start position.
classNamestring–