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-revealUsage
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
| Prop | Type | Default | Description |
|---|---|---|---|
text | string | — | 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 |
blur | number | 8 | How blurred each piece starts, in px |
lift | number | 8 | How far each piece rises as it arrives, in px |
stagger | number | 0.06 | Seconds between one piece and the next |
duration | number | 0.7 | Seconds each piece takes to come into focus |
delay | number | 0 | Seconds before the first piece starts |
trigger | "view" | "mount" | "view" | Play when it scrolls into view, or as soon as it mounts |
once | boolean | true | Only 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.
<BlurReveal
by="letter"
stagger={0.025}
blur={12}
text="Into focus."
className="text-4xl font-semibold tracking-tight"
/>