Seven ways to draw a line
Pencil is the default. The others are for when a divider should say something: ledger dashes, a squiggle, dots, kraft tape, a running stitch, a torn edge.
A rule that visually or semantically separates content, drawn by hand: pencil, ledger dashes, a squiggle, dots, a strip of tape, a running stitch or a torn edge of paper. Horizontal or vertical, with an optional centered label.
npx shadcn@latest add @wobko/separatorFirst time here? Add the registry to components.json first. How to install
Pencil is the default. The others are for when a divider should say something: ledger dashes, a squiggle, dots, kraft tape, a running stitch, a torn edge.
Children turn the separator into a labeled divider: two rules and a word. Here it splits a sign-in card in two, the way every sign-in card does.
In a flex row give the separator a height (h-5, or self-stretch). Each vertical rule is its own drawing, so no two are quite alike.
A torn strip where a page changes subject, a stitch where two things are joined, tape for the fold. Real headings and paragraphs stay real; the dividers are decoration.
Official `separator-demo`: a heading and blurb, a horizontal rule, then three links divided by vertical rules. Both rules are pencil pulls; the vertical ones fill the height of their row.
A Radix Separator (asChild is not offered: the element is the drawing's host). Without children it is a 1 px hairline whose drawing is centered on it and spills up to 12 px across it (a hairline host, so layout is exactly shadcn's). Along its length the host clips (`overflow-x: clip` for a horizontal rule, `overflow-y: clip` for a vertical one), so a rule that ends at the window edge never scrolls the page sideways. With children it becomes a labeled divider: two rules around your text.
| Prop | Type | Default | Description |
|---|---|---|---|
| orientation | "horizontal" | "vertical" | "horizontal" | Horizontal is h-px w-full; vertical is w-px h-full (give it a height in a flex row, or self-stretch). |
| decorative | boolean | true | As Radix: decorative rules are role=none and invisible to assistive tech; set false for a real thematic break (role=separator). |
| variant | "pencil" | "dashed" | "wavy" | "dotted" | "tape" | "stitched" | "torn" | "pencil" | pencil = a graphite line drawn against a ruler; dashed = ledger dashes; wavy = a felt-tip squiggle; dotted = ink dots; tape = a strip of kraft tape stuck across; stitched = a running stitch in marker thread; torn = a strip of paper torn along both edges. Calm density draws tape, stitched and torn as the pencil rule. |
| children | ReactNode | - | Puts a label in the middle ("or", "continue with"): two rules of the same variant either side, the text in the hand font. The label is real text, read by screen readers when the separator is decorative. |
| seed | string | number | - | Pins the hand: the same seed always draws the same rule. Default: derived from useId(). |
The files the CLI copies into your project.
Loading the source