Skip to content
English

How it works

The text is split into words (CJK into characters, since it has no spaces) and each piece gets its index as a CSS variable. When the element is 30% visible, every piece moves from transparent, blurred and 0.22em low to its place after delay + index × step, with an ease-out. Blur clears a little faster than the fade completes, so the words look as if they come into focus rather than simply appearing. The total spread is capped, so long text still finishes quickly. In character mode each word stays unbreakable, so lines wrap where they would anyway.

Use it for

  • Headlines and leads of articles, landing sections and announcements.
  • A calm entrance for short text that should be noticed once.

Look elsewhere when

  • Body text, lists or anything people need to read at once.
  • Text that changes often: every change would replay.

Usage

import { BlurInText } from './BlurInText.jsx'

export function ArticleHeader() {
  return (
    <>
      <BlurInText as="h1" text="The quiet hour before the harbour wakes" stagger={70} />
      <BlurInText text="Fishing boats idle at the breakwater." delay={500} stagger={30} blur={6} />
    </>
  )
}

Props

PropTypeDefaultWhat it does
textstring—The text to reveal.
asElementType'p'Element to render, such as h1.
by'word' | 'char''word'Pieces to animate. Chinese, Japanese and Korean always go character by character.
staggernumber60Delay between pieces in ms.
maxStaggernumber1400Cap on the total spread, so long text does not take forever.
durationnumber700Duration of each piece in ms.
blurnumber10Starting blur in px.
delaynumber0Delay before the first piece in ms.
trigger'view' | 'mount''view'Start when visible, or at once.
onDone() => void—Called when the last piece has settled.

Accessibility

  • The full text sits in a visually hidden span, so screen readers read it once as a sentence; the animated pieces are aria-hidden.
  • The rendered element (as) keeps its semantics, such as a heading level.
  • Nothing is interactive and no content is withheld: the reveal finishes within about two seconds.
  • Reduced motion replaces the blur, movement and stagger with one short fade of the whole text.

Motion

Each piece takes 700ms with an ease-out (blur clears in 80% of that), starting index × 60ms after the delay, with the whole spread capped at 1.4s.

Add it to your project

Copy the prompt into Codex or Claude Code. The agent reads the published source, shows you what it will write and adds the component next to your own.

BlurInText.jsxblur-in-text.csstokens.cssREADME.md

Both files install together. The stylesheet reads the design tokens in tokens.css and carries fallbacks, so it also works alone.

Text motion
Morphing text comes with Pro. Its preview shows once you unlock it.
Scramble text comes with Pro. Its preview shows once you unlock it.