Skip to content

Blur-In Text Animation for React

A blur text animation for React where words sharpen out of a soft blur one after another: the classic hero-headline reveal.

npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/text-effects.json

Hero headline

Render it as any element with render (here paragraphs styled as a headline; use render={<h1 />} for the page's real heading). It plays once, when it scrolls into view.

Interfaces you can see through.

Glass components with motion that stays readable, accessible and fast.

Files to copy

5 folders · 7 files · 4 packages
From theme/src/
  • components/text-effects/{blur-in.tsx, text-utils.ts}
  • hooks/{use-media-query.ts, use-preferences.ts}
  • motion/{gate.ts, tokens.ts}
  • lib/cn.ts
  • styles/
shadcn CLI
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/text-effects.jsonRegistry item: text-effects. The styles need the Tailwind v4 glass UI setup.
Packages
pnpm add @base-ui/react clsx motion tailwind-merge

Character by character

by="character" reveals each letter (emoji and accents stay whole). Words never break apart mid-line. It is also the mode for languages written without spaces.

Ship it ✨

こんにちは、世界

Props

PropTypeDefaultDescription
text (required)stringNoneThe text to reveal.
by"word" | "character""word"Reveal word by word (default), or character by character (also the choice for languages written without spaces).
delaynumber0Seconds before the first piece starts.
staggernumber0.07 for words, 0.025 for charactersSets the seconds between pieces.
durationnumberdurations.slowerSeconds each piece takes to arrive.
blurnumber10Starting blur in px. 0 for a plain fade-up.
offsetstring"0.35em"How far each piece rises, as a CSS length. "0" for none.
animateOnViewbooleantrueWait until the text is on screen. Off: play on mount.
oncebooleantruePlay only the first time it enters the view. Off: replay every time it comes back.
onComplete(() => void)NoneCalled when the last piece has landed.
pieceClassNamestringNoneClasses for each animated piece (e.g. a gradient per word).
renderReactElement | function<span />Render as another element: an h1, a p…

Keyboard

KeysAction
TabNot focusable: this is text.

Accessibility

  • The text is in the DOM from the start, so screen readers and search engines read it once, whether or not it has animated.
  • Under reduced motion it is plain static text, with nothing to wait for.

When to use the blur in effect

  • Use it as a text reveal animation on the one hero headline of a landing page, where each word sharpens out of a soft blur as it rises into place and gives the page a deliberate first impression.
  • Use it for an empty-state or onboarding welcome line, such as a first-run greeting in a dashboard, where one short sentence should arrive with a little ceremony instead of simply appearing.
  • Switch to by="character" for a short tagline or for languages written without spaces, each word stays one unbreakable box, so letters never wrap on their own.
  • Skip it when the text is body copy, a list or anything people scan quickly; animated paragraphs slow reading, so keep plain text there or use Typewriter for a phrase that changes over time.
  • Pair it with ShimmerText for a subtitle that lights up after the headline lands, a Button for the call to action, and the useSheenReducedMotion hook if you gate other motion yourself.

Frequently asked questions

19 effects pages in all: browse them on All effects.

By Lokendra Singh Rathore (GitHub, opens in a new tab). Published , updated .