# Section Fade

A section whose live gradient fades out at its edges.

Source: https://gradients.sh/docs/components/section-fade

## Installation

```bash
npx shadcn@latest add https://gradients.sh/r/section-fade.json
```

## Usage

```tsx
import { SectionFade } from "@/components/section-fade";

<SectionFade edges="bottom" className="py-32">
  {children}
</SectionFade>;
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `ReactNode` | `—` | Section content. |
| `kind` | `GradientKind` | `"aurora"` | Which gradient fills the component: one of the six free kinds, or any kind registered with the engine. |
| `edges` | `"top" \| "bottom" \| "both"` | `"both"` | Which edges fade to transparent. |
| `colors` | `[string, string, ...string[]]` | `["#a0f0c8", "#3fb5a3", "#5147b6", "#b25c9c"]` | Two to six colours: hex, oklch(), names or var(--token). |
| `background` | `string` | `"#03050b"` | Base colour under the gradient. |
| `speed` | `number` | `0.7` | 0 to 2. How fast the gradient moves. 0 holds it still. |
| `loopSeconds` | `number` | `18` | 4 to 30. The animation repeats exactly every loopSeconds. |
| `scale` | `number` | `1` | 0.25 to 4. Noise frequency: higher means smaller shapes. |
| `warp` | `number` | `0.5` | 0 to 1. Domain-warp strength. |
| `grain` | `number` | `0.1` | 0 to 1. Film grain. |
| `blur` | `number` | `0.5` | 0 to 1. Softness. |
| `seed` | `number` | `3` | Integer seed for the noise field. |
| `dither` | `{ enabled?: boolean; cell?: number; levels?: number }` | `{ enabled: false, cell: 3, levels: 8 }` | Ordered 4×4 Bayer dither. |
| `interaction` | `{ pointer?: number; scroll?: number }` | `{ pointer: 0.2, scroll: 0.2 }` | 0 to 1 influence of the pointer and of scroll velocity. |
| `maxDpr` | `number` | `1.5` | Device pixel ratio cap for the canvas. |
| `reducedMotion` | `"respect" \| "ignore"` | `"respect"` | "respect" shows one still frame when the user prefers reduced motion. |
| `className` | `string` | `—` | Classes for the outer element. Size it here; the gradient fills it. |
