Divider

The Divider component provides a visual separation between sections, with customizable orientation, length, thickness, and style.

Usage

Default

Above

Below

<Divider orientation="horizontal" length="100%" thickness="1px" />

Props

Data table
TypeDescription
as"div" | "hr" | "span"HTML tag to render ('div' | 'hr' | 'span').
dashedbooleanWhether the divider should be dashed instead of solid.
data-testidstringOptional test ID for testing frameworks.
decorativebooleanWhether the divider is purely decorative. When true, it is hidden from assistive technology. Default: true
labelstringAccessible label for a meaningful separator. Only used when decorative is false.
labelledBystringID of an element that labels this separator. Only used when decorative is false.
lengthstringLength of the divider (e.g., "100%", "60px").
orientationOrientationTypeOrientation of the divider ('horizontal' | 'vertical'). Default is 'horizontal'.
stateStateTypeState of the divider ('success' | 'error' | 'warning' | 'disabled' | '').
themeThemeTypeTheme style to apply to the divider ('primary' | 'secondary' | 'tertiary' | 'quaternary' | 'clear').
thicknessstringThickness of the divider (e.g., "1px", "4px").