Separator
Hairlines and tube dividers, with optional labels.
Mara Okafor 6:42 PM
Pushed the new pricing table to staging. Can someone sanity-check the annual toggle?
Theo Lindqvist 7:05 PM
Looks right to me. The yearly total rounds down on the Team plan though.
Mara Okafor 9:12 AM
Fixed the rounding. Totals now come straight from the billing API.
Iris Chen 9:20 AM
Approved. Shipping it with the 2.4 release this afternoon.
Installation
npx shadcn@latest add https://neonkit.heyaadi.com/r/separator.jsonUsage
import { Separator } from "@/components/ui/separator"
<Separator variant="tube" label="2 new messages" decorative={false} />Examples
Variants
Hairline is the default. Dashed uses a gradient so the dashes match in every browser.
Vertical
In a flex row a vertical separator stretches to the row's height.
Label on a hairline
Most dividers should stay quiet. The label breaks the line and centers itself.
API reference
Also accepts native div attributes. Without a label, hairline and dashed render a single element, so className restyles the line itself.
| Prop | Type | Default |
|---|---|---|
variant | "hairline"A quiet line, a lit tube with end caps, or 4px dashes. | "hairline" |
orientation | "horizontal"Horizontal fills the width. Vertical stretches to the height of a flex row. | "horizontal" |
label | ReactNodeText centered in the line. The line breaks around it. | None |
decorative | booleanHidden from assistive tech when true. Set false when it separates real sections. | true |
color | NeonColorColor of the tube and its label. Falls back to --neon-accent, then cyan. | inherited |
Accessibility
- Decorative separators render role="none", so screen readers skip the line but still read a label as plain text.
- With decorative={false} it renders role="separator" with aria-orientation, and a label becomes its accessible name through aria-labelledby.
- A vertical separator needs a flex row to stretch in. Anywhere else, give it a height with className.