shadcn.io is not affiliated with official shadcn/ui
Separator examples · Basic
Section Divider Separator for React
A horizontal separator between two titled sections with supporting text.
Give related sections one shared canvas and a clear break. This React Separator sits between two heading and description blocks in a flex column, so the line closes one section and the next heading opens the next. Use it for settings pages, profile groups and article segments that shouldn't become separate cards.
Preview
Installation
FAQ
When should I use separators between sections instead of cards?
Use a line when the sections belong to one page or form. Use Cards when each block stands on its own, something people open or rearrange. Lines keep a continuous reading flow; cards add weight and isolation.
How much space should sit between titled sections?
gap-6 or gap-8 around the line, with a tight gap-1 inside each heading and description pair, as here. Loose between sections and tight within them is what makes the line read as a section break.
Should the heading come before or after the separator?
Section, line, next heading. A line directly above a title reads as a rule over the heading rather than a break between sections.
Should section separators look different from list separators?
Keep the same one-pixel line in the border color. The hierarchy comes from spacing and headings, not a thicker line; save thick or double lines for rare formal breaks.
Related
- Horizontal SeparatorA horizontal separator that divides a
- List SeparatorHorizontal separators between the rows of
- Simple Line SeparatorA single horizontal separator with its
- Vertical SeparatorVertical separators between inline items
- Standard CardA basic card with a title, a description
- Basic TabsFour horizontal tabs that switch between