Divider

Divider is a simple component for visually separating content. It supports both horizontal and vertical orientations and can display a label inline.

3
Variants
4
Spacing
Label
With Label
Radix
Base

Playground

Preview
H

Content above the divider

Content below the divider

Variant
Color
Spacing
Direction
Label
<Divider />

Variants

solidSolid
Section break

Default solid line — ideal for general content separation.

dashedDashed
Sub-divider

Dashed style — conveys a lighter or draft-state separation.

dottedDotted
Supplemental break

Dotted style — the most subtle form of separation.

Spacing

sm
Margin8px

Above

Below

md
Margin12px

Above

Below

default
Margin16px

Above

Below

lg
Margin32px

Above

Below

API

Props

orientation"horizontal"
"horizontal" | "vertical"

Orientation of the divider

variant"solid"
"solid" | "dashed" | "dotted"

Line style

color"default"
"default" | "muted" | "strong"

Line color intensity

spacing"default"
"sm" | "md" | "default" | "lg"

Spacing around the divider

labelundefined
ReactNode

Content displayed on the divider (horizontal only)

labelPosition"center"
"left" | "center" | "right"

Position of the label

decorativetrue
boolean

Decorative separator — role="none" when true

Anatomy

1

With label

2
3
OR

Plain

4
Default margin16px
Border1px
Label padding12px
1
Root
Line container
2
Line
1px border
3
Label
Center text (optional)

Best Practices

Recommended

  • Use to separate related content groups
  • Use a labeled Divider to clarify section meaning
  • Use vertical orientation for nav items and toolbars
  • Vary color to match the content hierarchy

Don't

  • Don't overuse Dividers — it clutters the layout
  • Don't use Divider alone to add spacing — use the spacing prop
  • Don't use Divider as purely decorative noise
  • Don't mix different variants within the same section

Accessibility

Keyboard

Divider is decorative and not included in keyboard navigation — it does not receive focus.

ARIA / WCAG

  • role="none" for decorative Divider (decorative=true)
  • role="separator" for a semantic separator (decorative=false)
  • aria-orientation set automatically
  • Follows Radix Separator Primitive