Updated
Blur Reveal
Customize
Duration0.40s
Stagger0.030s
Blur8px
Text size48px
Installation
npx shadcn@latest add https://uibrik.com/r/blur-reveal.jsonInstall the packages
npm install motionCopy the source into your project
components/uibrik/blur-reveal/blur-reveal.tsx"use client"; import { motion } from "motion/react"; // `play` counts presses of a card's Change button. 0 means the card has not // been pressed yet, so every effect renders its resting state without // animating on page load. export type EffectProps = { play: number }; // Size comes from --text-effect-size (default 1.25rem, i.e. text-xl), so a // preview can enlarge every effect without changing the installed default. const SIZE = "text-[length:var(--text-effect-size,1.25rem)] leading-[1.4]"; const TEXT = `${SIZE} text-zinc-700 font-medium dark:text-zinc-200`; const EASE_OUT = [0.23, 1, 0.32, 1] as const; const glyph = (ch: string) => (ch === " " ? " " : ch); // 03 — A blur travels left to right across the line: each character // fades in from soft to sharp a beat after the one before it. export function BlurReveal({ play, text = "Coming into focus",
Adds the files to
components/uibrik/blur-reveal and installs motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/blur-reveal.Usage
import { BlurReveal } from "@/components/uibrik/blur-reveal/blur-reveal";<BlurReveal play={0} text="Coming into focus" duration={0.4} stagger={0.03} blur={8}/>Where to use Blur Reveal
Hero headlines on load
Letters sharpening one after another draw the eye to the headline as the page appears.
Section titles on scroll
A soft focus-in gives each section heading a quiet entrance without moving the layout.
Pairs with Scroll to Highlight
Quotes and taglines
A slow reveal adds weight to a single line, such as a mission statement or customer quote.
Props
BlurReveal- text
- Type string
- "Coming into focus"
- The copy to animate.
- duration
- Type number
- 0.4
- Time for each character to sharpen.
- stagger
- Type number
- 0.03
- Delay between characters.
- blur
- Type number
- 8
- Starting blur.
- playrequired
- Type number
- –
- Each change plays the effect again; 0 shows its resting state.