Skip to content

Text Appear

A heading whose words rise into place out of a blur, one after another.

$npx shadcn@latest add https://framebrick.co/r/text-appear.json

From the Titen template, see it in context.

Build the thing people remember

Examples

Letters

Each letter rises out of a blur, one after another; a word never breaks inside.

Hello, I am Alex

<TextAppear as="h2" by="letter" text="Hello, I am Alex" className="text-4xl font-semibold" />

Whole text

The whole text rises as one block, for a lead or an intro.

A studio for brands that would rather be useful than loud.

<TextAppear by="line" delay={0.4} text="A studio for brands that would rather be useful than loud." />

Rows

Each wrapped line rises in turn, 0.05 s after the one before, with no blur: a page title that wraps.

Every page starts with a sentence that earns the next one

<TextAppear as="h1" by="row" delay={0.2} text="Every page starts with a sentence that earns the next one" className="max-w-xs text-2xl font-semibold text-balance" />

Installation

$ npx shadcn@latest add https://framebrick.co/r/text-appear.json

Usage

import { TextAppear } from "@/components/ui/text-appear";

<TextAppear as="h1" text="Build the thing people remember" className="text-4xl font-semibold" />
<TextAppear by="line" delay={0.4} text="A studio for brands that would rather be useful than loud." />

// Ciketo's version: no blur, a touch slower between words
<TextAppear text="Design that earns its keep" blur={0} stagger={0.075} trigger="view" />

// Tustel's hero: letter by letter
<TextAppear by="letter" text="Hello, I am Alex" />

// Catchup's page titles: each wrapped row in turn, no blur
<TextAppear as="h1" by="row" delay={0.2} text="A page title that wraps over a few lines" />

Props

PropTypeDefaultDescription
textstring—The text. It is split on spaces, so the kerning inside a word is never touched (unless `by="letter"`).
asElementType"p"The element to render: a heading, a paragraph, anything.
by"word" | "row" | "line" | "letter""word"Move each word in turn, each wrapped row in turn, each letter, or the whole text at once.
trigger"load" | "view""load"Play on mount, or the first time it scrolls into view. Either way, once.
delaynumber0Seconds before it starts.
staggernumber0.05Seconds between words (between rows with `by="row"`, between letters with `by="letter"`).
blurnumber7 / 10 / 0Blur it starts from, in px; 0 turns the blur off. 7 by word and by line, 10 by letter, none by row.
distancenumber10 / 7How far it rises, in px (10 by word and by letter, 7 by line and by row).
  • Screen readers get the sentence once, from a visually hidden copy; the animated words are aria-hidden.
  • With reduced motion the text is simply there: MotionConfig would skip the movement but keep animating opacity and blur, so the component checks for itself. The server cannot know, so it sends the animated words and a reduced-motion visitor gets plain text right after hydration — chosen with useSyncExternalStore, because reading matchMedia in the first client render is a hydration mismatch.
  • The words start at opacity 0 on the server, so the text appears when the page hydrates — keep the delay short on anything above the fold. A noscript style puts them back if JavaScript never runs, so the heading is never simply missing.
  • For tests: with JavaScript on, the element's textContent holds the sentence twice (the screen-reader copy and the animated words) plus the text of the noscript style, so an assertion on textContent sees more than the sentence. Query the heading by role and name instead — it reads once to assistive technology — or check that it is visible.
  • Whole words keep their kerning; `by="letter"` is Tustel's hero, and splits the text into letters as Framer does, so the kerning inside a word is lost. Keep it for short display text. A word never breaks inside and the spaces between words do not move; each letter rises 10 px out of a 10 px blur on a spring with no bounce over 0.3 s, 0.05 s after the one before. `by="line"` moves the lot.
  • `by="row"` is the page-title effect of Ciketo and Catchup: each wrapped line rises 7 px and fades in, 0.05 s after the line before, from the start `delay` (Catchup 0.2 s), with no blur. Ciketo's slower 0.075 s is `stagger`. The markup is the word mode's, so the HTML never depends on where the text wraps (that would be a hydration mismatch): once the browser has laid the words out, each word's offsetTop says which row it is on, and that only sets its delay. A load waits, hidden, until the rows are known (before the first paint), and they are measured again when the width changes.

AI prompt

Paste into v0, Lovable, Bolt or Claude to rebuild this component in your own project.

Create a React + Tailwind CSS + Motion (motion/react) component called TextAppear.
- Split the text on spaces into inline-block spans, keeping the spaces as text between them so it still wraps.
- Each word animates from opacity 0, y 10 and blur 7px to rest, with a spring of stiffness 320, damping 58, mass 1,
  each word 0.05s after the one before (delayChildren for the initial delay, staggerChildren for the rest).
- by="line" moves the whole text as one span instead, from y 7, spring 320 / 64 / 1.
- by="letter" wraps each word in an inline-block whitespace-nowrap span (a word never breaks inside; the spaces stay
  outside, still) and animates every letter from opacity 0, y 10 and blur 10px, with a spring of bounce 0 and duration 0.3s,
  each letter 0.05s after the one before (the stagger runs across all letters in order). Give each letter data-appear-word
  so the noscript style restores it.
- by="row" renders the same word spans (the markup must not depend on where the text wraps). After layout, in a
  useLayoutEffect with a ResizeObserver on the container, read each word's offsetTop (it ignores transforms, so the
  hidden words measure like the shown ones): a new row starts when offsetTop grows by more than 2px. Keep the row of
  every word in state, null until measured, and only set the state when the rows changed. A word rises from opacity 0
  and y 7, no blur, on the line spring (stiffness 320, damping 64, mass 1), with transition delay = delay + stagger * its row; the
  parent has no delayChildren or staggerChildren. With trigger="load" keep animate="hidden" until the rows are known.
- trigger="load" animates on mount; trigger="view" uses whileInView with { once: true, amount: 0.3 }.
- Put the orchestration on a span inside the element the caller asked for, so no component is created during render.
- A visually hidden copy of the text carries it for screen readers; the animated spans are aria-hidden.
- With useReducedMotion() true, render the plain text — MotionConfig would still animate opacity and blur.

Be the first to know

Get new templates and components first

One short email when we release a template or a free component. No spam — unsubscribe anytime.

We use your email only for Framebrick updates. Privacy policy