# Stamp

> A postage stamp: round bites out of all four edges.

- Category: Shapes (Outlines that are not rectangles, with borders that follow them.)
- Registry item: `edge-frame` — Stamp is a recipe: a few layers of `edge-frame` put together, not an item of its own. Install `edge-frame` and copy the code below.
- Live preview with controls: https://fancyborders.vercel.app/docs/components/stamp

## Installation

```bash
npx shadcn@latest add https://fancyborders.vercel.app/r/edge-frame.json
```

With the registry namespace: `npx shadcn@latest add @fancyborders/edge-frame`.

The CLI also adds what `edge-frame` is built on: `frame`, `shape-frame`.

Files it adds: `components/ui/frame.tsx`, `components/ui/shape-frame.tsx`, `components/edge-frame.tsx`, and its CSS goes into the global stylesheet after the Tailwind import.

## Usage

The code for the preview at its default settings:

```tsx
import { EdgeFrame } from "@/components/edge-frame";

<EdgeFrame
  edge="bite"
  sides={["top", "right", "bottom", "left"]}
  size={12}
  depth={4}
  fill="var(--background)"
  className="w-40 p-3 drop-shadow-md"
>
  Your picture
</EdgeFrame>
```

## API reference

### EdgeFrame

```tsx
import { EdgeFrame } from "@/components/edge-frame";
```

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `edge` | `"zigzag" \| "wave" \| "scallop" \| "bite"` | `"zigzag"` | The pattern cut into the edges: zigzag teeth, a wave, a scallop of round bumps, or round bites like the edge of a stamp. |
| `sides` | `("top" \| "right" \| "bottom" \| "left")[]` | `top and bottom` | Which edges get the pattern. |
| `size` | `number` | `16` | Length of one tooth, wave or bump, in pixels. Each edge fits a whole number of them, so the real length is the closest that divides it. |
| `depth` | `number` | `8` | How far the pattern reaches in from the edge, in pixels. |

Also accepts line, fill, color and every div attribute.
