shadcn.io is not affiliated with official shadcn/ui
Separator examples · Basic
Menu Separator for React
Vertical separators between menu items that each have a title and a description.
Separate a row of labeled items, each with a title and a supporting line. This React Separator stands between the items with orientation="vertical", stretches to the height of the tallest one, and the last item and its line are hidden below the md breakpoint. Use it for settings summaries, account switchers and compact tool headers.
Preview
Installation
FAQ
When should I use this menu row instead of a nav of links?
When each item has a title and a supporting line, such as Settings with Manage preferences. A plain row of links, as in the In Navigation example, is enough when the label says it all.
How does the vertical line get its height?
The row is a flex container with items-center, and a vertical Separator stretches to the row's height, which is set by the two-line items. Don't give the Separator a fixed height; let the content decide.
Why hide the last item on small screens?
Three labeled columns overflow a 320 pixel screen. The Help item and the line before it are hidden below md, so the first two items and their line still read as a split row.
What gap should I use between items?
gap-2 on small screens and md:gap-4 once there's room, as here, so the line never sits against the text.
Related
- In Navigation SeparatorVertical separators between navigation
- Vertical SeparatorVertical separators between inline items
- List SeparatorHorizontal separators between the rows of
- Horizontal SeparatorA horizontal separator that divides a
- Section Divider SeparatorA horizontal separator between two titled
- Simple Navigation Navigation MenuA navigation menu with Products and