# Backdrop

A layout wrapper with configurable background fill, padding, and border radius.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).

## Installation

<TabsTrigger value="cli">Command</TabsTrigger>
<TabsTrigger value="manual">Manual</TabsTrigger>

```bash
npx shadcn@latest add @framecn/backdrop
```

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

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

## Usage

```tsx
import { Backdrop } from "@/components/framecn/backdrop";
```

```tsx
<Backdrop background="linear-gradient(135deg, #667eea 0%, #764ba2 100%)" />
```

## API Reference

### Backdrop

| Prop               | Type           | Default                                               |
| ------------------ | -------------- | ----------------------------------------------------- |
| `background`       | `string`       | `"linear-gradient(135deg, #667eea 0%, #764ba2 100%)"` |
| `fill`             | `BackdropFill` | `-`                                                   |
| `padding`          | `number`       | `10`                                                  |
| `radius`           | `number`       | `4`                                                   |
| `shadow`           | `string`       | `-`                                                   |
| `children`         | `ReactNode`    | `-`                                                   |
| `width`            | `number`       | `1280`                                                |
| `height`           | `number`       | `720`                                                 |
| `speed`            | `number`       | `1`                                                   |
| `fps`              | `number`       | `30`                                                  |
| `durationInFrames` | `number`       | `90`                                                  |
| `className`        | `string`       | `-`                                                   |

### BackdropFill

```ts
type BackdropFill =
  | { type: "color"; value: string }
  | { type: "gradient"; value: string }
  | { type: "image"; src: string; fit?: "cover" | "contain" };
```

## Notes

  The `background` prop accepts any CSS background string (colors, gradients,
  etc.) and is used when no `fill` is provided. For image fills or more precise
  control, pass a typed `fill` object instead. `padding` and `radius` are
  expressed as percentages of the composition dimensions.