Blur Reveal

Text that arrives a word at a time, each word fading up out of a soft blur as it scrolls into view.

Every word drifts in on a gentle breeze, soft at first, then sharp.

Props
By
Blur8
Lift8
Stagger0.06
Duration0.70

Installation

pnpm dlx shadcn@latest add @breeze/blur-reveal

Usage

import { BlurReveal } from "@/components/breeze/blur-reveal"

It renders a <p> by default and takes your own classes, so style it like any other text.

<BlurReveal
  text="Every word drifts in on a gentle breeze, soft at first, then sharp."
  className="text-3xl font-medium tracking-tight"
/>

Use as for a heading, and \n for a new line:

<BlurReveal as="h1" text={"Calm by default.\nSharp when it counts."} className="text-5xl font-semibold" />

Props

PropTypeDefaultDescription
textstring—The text to reveal. \n starts a new line
as"p" | "h1" | "h2" | "h3" | "h4" | "span" | "div""p"The element to render
by"word" | "letter""word"Reveal a word at a time, or a letter at a time
blurnumber8How blurred each piece starts, in px
liftnumber8How far each piece rises as it arrives, in px
staggernumber0.06Seconds between one piece and the next
durationnumber0.7Seconds each piece takes to come into focus
delaynumber0Seconds before the first piece starts
trigger"view" | "mount""view"Play when it scrolls into view, or as soon as it mounts
oncebooleantrueOnly play the first time it comes into view

By default it waits until it scrolls into view, then plays once. With by="letter", words still never break across lines mid-word. Screen readers get the whole text at once, and with reduced motion the text simply shows, with no animation.

Examples

Letter by letter

Into focus.