# Blur Fade

- Page: https://jiguang132.com/resources/magic-ui/docs/blur-fade
- Resource: Magic UI (https://jiguang132.com/resources/magic-ui.md)
- All guides: https://jiguang132.com/resources/magic-ui/docs.md

Install: `npx shadcn@latest add https://jiguang132.com/r/magic-ui/blur-fade.json`

## Use case

Reveal child content with a blurred fade transition.

## Native props used by the examples

Extracted from all local examples for this entry, grouped by imported module and native owner, including other Magic components used by compound demos. This is not an exhaustive API or a universal host variant. Inspect spread object declarations and the source types/defaults below.

| Owning component prop | Explanation | Example source |
| --- | --- | --- |
| `BlurFade.delay` (blur-fade) | Native start delay; Motion seconds versus typing/terminal milliseconds must not be mixed. | `examples/blur-fade-demo.tsx`、`examples/blur-fade-text-demo.tsx` |
| `BlurFade.inView` (blur-fade) | Gate BlurFade animation with the native viewport observer. | `examples/blur-fade-demo.tsx`、`examples/blur-fade-text-demo.tsx` |
| `BlurFade.children` (blur-fade) | Native child content; keep the owning component's text/element constraints. | `examples/blur-fade-demo.tsx`、`examples/blur-fade-text-demo.tsx` |

## Interaction and state checks

- Blur Fade Demo — `blur-fade-demo`
- Blur Fade Text Demo — `blur-fade-text-demo`

These names identify real example entries, not new component props or extra components. Check pointer/keyboard behavior, themes, small screens and failures for the selected example. Decorative effects must not invent disabled/error/submission states. Complete example installation includes the actual dependency closure.

## Business integration boundary

inView optionally gates entry by the current viewport. Keep important content visible in static/reduced-motion fallbacks.

## Host and motion setup

Initialize Tailwind CSS v4, semantic CSS variables and the dark variant; import the independent local Registry namespace. Reuse an existing next-themes Provider without substituting JGuang UI/Base UI/HeroUI APIs. Mount effects in view and unmount offscreen; provide static alternatives for unavailable Canvas/WebGL or failed remote media. Respect prefers-reduced-motion and verify timer/RAF/observer/listener cleanup: stopping CSS alone does not prove the engine stopped. Examples provide no backend, login, payment or real AI stream. This practical guide is bilingual; detailed upstream references and demo text retain their original language.


## Available examples

blur-fade-demo, blur-fade-text-demo

Demo state and mock data do not provide a backend service. Inspect the component props before wiring real data.




## Installation

<Tabs defaultValue="cli">

<TabsList>
  <TabsTrigger value="cli">CLI</TabsTrigger>
  <TabsTrigger value="manual">Manual</TabsTrigger>
</TabsList>
<TabsContent value="cli">

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

</TabsContent>

<TabsContent value="manual">

<Steps>

<Step>Copy and paste the following code into your project.</Step>



<Step>Update the import paths to match your project setup.</Step>

</Steps>

</TabsContent>

</Tabs>

## Examples



## Usage

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

```tsx showLineNumbers
<BlurFade>
  <img src="https://picsum.photos/300/200?random=1" alt="Sample 1" />
  <img src="https://picsum.photos/300/200?random=2" alt="Sample 2" />
  <img src="https://picsum.photos/300/200?random=3" alt="Sample 3" />
</BlurFade>
```

## Props

| Prop           | Type              | Default   | Description                                                 |
| -------------- | ----------------- | --------- | ----------------------------------------------------------- |
| `children`     | `React.ReactNode` | `-`       | The content to be animated                                  |
| `className`    | `string`          | `-`       | The class name to be applied to the component               |
| `variant`      | `object`          | `-`       | Custom animation variants for motion component              |
| `duration`     | `number`          | `0.4`     | Duration (seconds) for the animation                        |
| `delay`        | `number`          | `0`       | Delay (seconds) before the animation starts                 |
| `offset`       | `number`          | `6`       | Offset for the animation                                    |
| `direction`    | `string`          | `"down"`  | Direction for the animation (`up`, `down`, `left`, `right`) |
| `inView`       | `boolean`         | `false`   | Whether to trigger animation when component is in view      |
| `inViewMargin` | `MarginType`      | `"-50px"` | Margin for triggering the in-view animation                 |
| `blur`         | `string`          | `"6px"`   | Amount of blur to apply during the animation                |




## Complete example installation

The component command installs the component. Each example command also includes its actual imported components, native support UI, utilities and pinned dependencies. Helpers are not additional catalog components.

### Blur Fade Demo

```bash
npx shadcn@latest add https://jiguang132.com/r/magic-ui/examples/blur-fade/blur-fade-demo.json
```

Default import: `@/components/magicui/examples/blur-fade-demo`

Dependencies: `clsx@2.1.1`, `motion@12.42.2`, `tailwind-merge@3.6.0`

### Blur Fade Text Demo

```bash
npx shadcn@latest add https://jiguang132.com/r/magic-ui/examples/blur-fade/blur-fade-text-demo.json
```

Default import: `@/components/magicui/examples/blur-fade-text-demo`

Dependencies: `clsx@2.1.1`, `motion@12.42.2`, `tailwind-merge@3.6.0`

### Minimal usage and theme

```tsx
import Demo from '@/components/magicui/examples/blur-fade-demo';
import { ThemeProvider } from 'next-themes';
export default function Example() {
  return <ThemeProvider attribute="class" defaultTheme="system" enableSystem><Demo /></ThemeProvider>;
}

```

Initialize Tailwind CSS v4, semantic color variables and the dark variant first. Reuse an existing next-themes provider rather than nesting another. Next Link examples require a Next.js environment; in static Vite projects adapt the demo links to your router without changing the native component API. Some media and tweets require network access. Examples do not supply authentication or backend services.


## Source-backed parameter reference

Implementation signatures and types are generated from the pinned local source. Optional props, native inherited types, union branches and never exclusions are preserved. A forwardRef implementation's ref is a React reference, not an additional business prop.


```ts
BlurFade({
  children,
  className,
  variant,
  duration = 0.4,
  delay = 0,
  offset = 6,
  direction = "down",
  inView = false,
  inViewMargin = "-50px",
  blur = "6px",
  ...props
}: BlurFadeProps)
```



```ts
type MarginType = UseInViewOptions["margin"]

interface BlurFadeProps extends MotionProps {
  children: React.ReactNode
  className?: string
  variant?: {
    hidden: { y: number }
    visible: { y: number }
  }
  duration?: number
  delay?: number
  offset?: number
  direction?: "up" | "down" | "left" | "right"
  inView?: boolean
  inViewMargin?: MarginType
  blur?: string
}
```


### Destructuring defaults in source

Only defaults written directly in parameter/props destructuring are listed. Conditional expressions, runtime theme and computed values require source inspection; this is not an exhaustive behavior-default list.


```ts
// BlurFade
duration = 0.4

// BlurFade
delay = 0

// BlurFade
offset = 6

// BlurFade
direction = "down"

// BlurFade
inView = false

// BlurFade
inViewMargin = "-50px"

// BlurFade
blur = "6px"
```


### Native and external types

External types remain defined by React or native dependencies, not manually expanded into guessed props. The installed version's TypeScript definitions are authoritative.


```ts
MotionProps
React.ReactNode
UseInViewOptions
```

---

Index of all JGuang resources: https://jiguang132.com/llms.txt
