Components / Shapes

Receipt

A slip of paper torn off along a zigzag edge.

CORNER SHOP

Coffee3.50
Bagel2.75
Total6.25

Customize

Tooth
12px
Depth
6px
Torn at the top too

Installation

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

npx shadcn@latest add https://fancyborders.vercel.app/r/edge-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.

API reference

EdgeFrame

tsx
import { EdgeFrame } from "@/components/edge-frame";
PropTypeDefault
edge"zigzag" | "wave" | "scallop" | "bite"

The pattern cut into the edges: zigzag teeth, a wave, a scallop of round bumps, or round bites like the edge of a stamp.

"zigzag"
sides("top" | "right" | "bottom" | "left")[]

Which edges get the pattern.

top and bottom
sizenumber

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.

16
depthnumber

How far the pattern reaches in from the edge, in pixels.

8

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