Components / Lines

Border Styles

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

double

Customize

Variant
Line
3px
Radius
10px
Offset
0px

Installation

Border Styles is a recipe: a few layers of frame put together, not a component of its own. Install frame, then copy the code from the preview above.

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

The CLI copies the component into your project, adds anything it is built on, and writes its CSS into your global stylesheet. New to the CLI? See Installation.

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";
PropTypeDefault
variant"solid" | "dashed" | "dotted" | "double"

The CSS border style.

"solid"
offsetnumber | string

Distance from the frame's edge. Positive is outward, negative inward.

0
radiusnumber | string

Overrides the frame's radius for this layer.

–
colorstring

Overrides the frame's line colour for this layer.

–

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