Blur Fade
MotionReact reveal wrapper that fades, unblurs and lifts children into place as they scroll into view, with delay, duration, direction and once props.
Installation
npx shadcn@latest add @minidev/blur-fade
MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/blur-fade.json
Usage
import { BlurFade } from "@/components/ui/blur-fade"
export function Example() {
return (
<BlurFade />
)
}
API reference
| Prop | Type | Default |
|---|---|---|
| children | React.ReactNode | - |
| delaySeconds to wait before the reveal starts; grow it per item to stagger a list. | number | 0 |
| durationSeconds the reveal takes. | number | 0.5 |
| directionWhich way the content travels as it settles. | "up""down""left""right""none" | "up" |
| offsetPixels of travel. | number | 16 |
| blurBlur in pixels the content starts from. | number | 8 |
| onceReveal once, or again every time it enters the viewport. | boolean | true |
| amountHow much of the element has to be visible before it reveals, 0 to 1. | number | 0.3 |
| className | string | - |
When to use
Use it for scroll reveals of cards, sections and images on marketing pages. Product UI should not animate on load (law 5), so keep it out of app chrome. With no children it renders a sample grid of six feature cards.
Accessibility
- Hidden content is only
opacity: 0, so screen readers still read it before it reveals. - Under reduced motion the transition is 0s, so the content appears with no blur or travel.
Frequently asked questions
How do I stagger a list with BlurFade?
Wrap each item in its own BlurFade and grow delay: <BlurFade key={f.id} delay={i * 0.08}>. Position settles on a spring; opacity and blur use a tween so they never overshoot.
Why is my content invisible until I scroll, or missing in screenshots?
The server HTML carries the initial style (opacity: 0 and a blur), so content stays hidden until JavaScript runs and the element is in view. A very tall element may never reach the default amount={0.3}; lower amount for long sections. Do not wrap the main text of a page or above-the-fold content in it.
Can it replay every time the element enters the viewport?
Yes, pass once={false}. With the default once={true} it reveals one time and stays.
Dependencies
npm
Built from
Examples
Staggered list
Wrap each row and grow delay per item; the rows arrive one after another as the list scrolls in.
From the side
direction sets where the content travels from; offset is the distance in pixels and blur the starting softness.
Replay on scroll
once false reveals again every time the element enters the viewport; amount is how much must be visible first.