Separator
A thin line that splits content into parts. Nelumbo draws it very faint, and prefers space to lines: start with a gap between groups, and reach for a line only when the gap is not enough. Built on Radix, with shadcn's API.
Install
npx shadcn@latest add @nelumbo/separatorSpacing first
Most groups need no line at all. A larger gap, with a heading for each group, says the same thing and keeps the page quiet.
Line
The default: a 1px hairline in outline-variant at half strength. It separates two blocks without drawing the eye. Pass decorative={false} when a screen reader user should hear the boundary.
Notifications arrive as they happen. Quiet hours hold them until morning.
Sound and vibration follow the same schedule.
Inset
variant="inset" starts the line after a list's leading slot (72px, the same indent as a List divider), so it runs under the text, not under the icon.
Space
variant="space" renders only the gap, with no line. Use it where you would otherwise put a line between groups: the same break, no stroke.
Each group ends here.
The next group starts after a 16px gap.
Vertical, in a toolbar
A vertical separator stretches to the height of its row. Use it to split groups of buttons in a toolbar.
Usage
import { Separator } from "@/components/ui/separator"// shadcn's API<Separator /><Separator orientation="vertical" className="h-6" />// Nelumbo: a line that starts after a list's leading slot<Separator variant="inset" />// Nelumbo: spacing only, no line<Separator variant="space" />Props
| Prop | Type | Default | Radix's own props (orientation, decorative) work as is |
|---|---|---|---|
variant | "line" | "inset" | "space" | "line" | Faint hairline, a hairline from 72px in (inset), or spacing with no line |
orientation | "horizontal" | "vertical" | "horizontal" | A vertical line stretches to the height of a flex row |
decorative | boolean | true | Hidden from assistive tech. Set false when the boundary matters |