# Blur Fade

> React reveal wrapper that fades, unblurs and lifts children into place as they scroll into view, with delay, duration, direction and once props.

- Kind: Motion component (Motion)
- Docs: https://ui.minidev.pro/docs/blur-fade
- Source (registry JSON with the full file): https://ui.minidev.pro/r/blur-fade.json
- License: MIT. One file, yours to edit after install.

## 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.

## Installation

### shadcn CLI (copies the source into your project)

```bash
npx shadcn@latest add @minidev/blur-fade
```

Writes `components/ui/blur-fade.tsx` and installs its npm dependencies. Older CLI versions: `npx shadcn@latest add https://ui.minidev.pro/r/blur-fade.json`.

### npm package

```bash
npm i minidev-ui-kit lucide-react motion
```

Add the tokens to your global stylesheet once:

```css
@import "tailwindcss";
@import "minidev-ui-kit/styles.css";
@source "../node_modules/minidev-ui-kit";
```

Next.js also needs `transpilePackages: ["minidev-ui-kit"]` in next.config.

## Import

After the shadcn install:

```tsx
import { BlurFade } from "@/components/ui/blur-fade"
```

From the npm package:

```tsx
import { BlurFade } from "minidev-ui-kit/premium/blur-fade"
```

## Usage

```tsx
import { BlurFade } from "@/components/ui/blur-fade"

export function Example() {
  return (
    <BlurFade />
  )
}
```

## Props

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `children` | `React.ReactNode` | - | no |  |
| `delay` | `number` | `0` | no | Seconds to wait before the reveal starts; grow it per item to stagger a list. |
| `duration` | `number` | `0.5` | no | Seconds the reveal takes. |
| `direction` | `"up" \| "down" \| "left" \| "right" \| "none"` | `"up"` | no | Which way the content travels as it settles. |
| `offset` | `number` | `16` | no | Pixels of travel. |
| `blur` | `number` | `8` | no | Blur in pixels the content starts from. |
| `once` | `boolean` | `true` | no | Reveal once, or again every time it enters the viewport. |
| `amount` | `number` | `0.3` | no | How much of the element has to be visible before it reveals, 0 to 1. |
| `className` | `string` | - | no |  |

## Examples

### Staggered list

Wrap each row and grow delay per item; the rows arrive one after another as the list scrolls in.

```tsx
<div className="w-full max-w-md divide-y divide-border rounded-xl border border-border bg-surface">
  {[
    { id: "INV-2041", name: "Maya Chen", amount: "$4,200.00", status: "Paid" },
    { id: "INV-2042", name: "Theo Okafor", amount: "$1,850.00", status: "Sent" },
    { id: "INV-2043", name: "Priya Raman", amount: "$12,400.00", status: "Draft" },
  ].map((inv, i) => (
    <BlurFade key={inv.id} delay={i * 0.1}>
      <div className="flex items-center justify-between px-4 py-3 text-sm">
        <span>
          <span className="block font-medium text-fg">{inv.name}</span>
          <span className="font-mono text-xs text-fg-subtle">{inv.id}</span>
        </span>
        <span className="flex items-center gap-3">
          <span className="font-mono text-fg tabular-nums">{inv.amount}</span>
          <Badge variant={inv.status === "Paid" ? "accent" : "outline"}>{inv.status}</Badge>
        </span>
      </div>
    </BlurFade>
  ))}
</div>
```

### From the side

direction sets where the content travels from; offset is the distance in pixels and blur the starting softness.

```tsx
<BlurFade direction="left" offset={32} blur={12} duration={0.7}>
  <div className="w-full max-w-xs rounded-2xl border border-border bg-surface p-5 shadow-raised">
    <p className="text-xs font-medium tracking-[0.06em] text-accent-fg uppercase">Lumen 3.0</p>
    <p className="mt-2 text-xl font-medium tracking-[-0.02em] text-fg">Close the books in minutes</p>
    <p className="mt-1 text-sm text-fg-muted">Reconciliation, reminders and receipts, handled overnight.</p>
    <Button variant="outline" size="sm" className="mt-4">See what changed <ArrowRightIcon /></Button>
  </div>
</BlurFade>
```

### Replay on scroll

once false reveals again every time the element enters the viewport; amount is how much must be visible first.

```tsx
<BlurFade once={false} amount={0.6} direction="down">
  <p className="max-w-md text-center text-2xl font-medium tracking-[-0.03em] text-balance text-fg">
    Scroll away and back. This headline fades in each time.
  </p>
</BlurFade>
```

## 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.

## FAQ

### 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.

## Rules for generating code

- Use semantic tokens only (bg, surface, sunken, border, fg, fg-muted, fg-subtle, ink, accent, success, warning, danger). Never raw hex or palette steps like blue-500.
- Shadows only from the set: shadow-xs, shadow-sm, shadow-raised, shadow-md, shadow-lg, shadow-overlay.
- Numbers use tabular-nums. Dark mode is the `dark` class on <html>; components never branch on theme.

## Dependencies

- npm: `lucide-react`, `motion`

## Related

- [Animated Feature Row](https://ui.minidev.pro/docs/animated-feature-row/md): A row of feature cards that slide up with a staggered delay when scrolled into view. Pass title and description pairs; reduced motion keeps them still.
- [Animated List](https://ui.minidev.pro/docs/animated-list/md): A live feed where new items drop in at the top with a spring and older ones slide down. Ideal for activity streams, notifications and happening now sections.
- [Scroll Reveal](https://ui.minidev.pro/docs/scroll-reveal/md): A React wrapper that slides its children up into place once they scroll into view, with configurable offset and delay. Renders still for reduced motion.
- [Text Reveal](https://ui.minidev.pro/docs/text-reveal/md): A paragraph that lights up word by word as it scrolls through the viewport, from muted to full ink, using Motion scroll progress. Still text for reduced motion.
- [Card Tilt](https://ui.minidev.pro/docs/card-tilt/md): A card that tilts in 3D toward the pointer on springs, with an accent glare that follows the cursor. It stays flat when reduced motion is preferred.
- [Cursor Spotlight Panel](https://ui.minidev.pro/docs/cursor-spotlight-panel/md): A panel whose accent radial spotlight follows the cursor, driven by Framer Motion values without re-renders. It shows a still surface for reduced motion.

---

All 557 components: https://ui.minidev.pro/llms.txt (full text: https://ui.minidev.pro/llms-full.txt).
