# Border Styles

> Solid, dashed, dotted and double borders that follow the radius and can sit inside or outside the frame's edge.

- Category: Lines (Line styles for any frame: dashes, native styles and motion.)
- Registry item: `frame` — Border Styles is a recipe: a few layers of `frame` put together, not an item of its own. Install `frame` and copy the code below.
- Live preview with controls: https://fancyborders.vercel.app/docs/components/border-styles

## Installation

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

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

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

<Frame radius={10} line={3} className="p-6">
  <FrameBorder variant="double" />
  Content
</Frame>
```

## Good to know

- A double border needs a line at least 3 pixels wide to show both lines.

## API reference

### FrameBorder

```tsx
import { FrameBorder } from "@/components/ui/frame";
```

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `variant` | `"solid" \| "dashed" \| "dotted" \| "double"` | `"solid"` | The CSS border style. |
| `offset` | `number \| string` | `0` | Distance from the frame's edge. Positive is outward, negative inward. |
| `radius` | `number \| string` | – | Overrides the frame's radius for this layer. |
| `color` | `string` | – | Overrides the frame's line colour for this layer. |

Also accepts every div attribute, such as className and style.
