# Bracket Frame

> Corner brackets around a dashed border.

- Category: Frames (Structural frames: brackets, rails, marks and hatching.)
- Registry item: `bracket-frame`
- Live preview with controls: https://fancyborders.vercel.app/docs/components/bracket-frame

## Installation

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

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

The CLI also adds what `bracket-frame` is built on: `frame`.

Files it adds: `components/ui/frame.tsx`, `components/bracket-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 { BracketFrame } from "@/components/bracket-frame";

<BracketFrame className="p-5">
  Your content
</BracketFrame>
```

## Good to know

- The brackets sit on the box edge and the dashed border is drawn inside them, so give the frame at least as much padding as the gap.

## API reference

### BracketFrame

```tsx
import { BracketFrame } from "@/components/bracket-frame";
```

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `bracket` | `number \| string` | `14` | Length of each bracket arm. |
| `thickness` | `number \| string` | `2` | Line width of the brackets. |
| `gap` | `number` | `6` | Space between the brackets and the dashed border inside them. |

Also accepts every Frame prop and every div attribute.
