Divider

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

Usage & Examples

Default

Above

Below

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

Props API

14 props
Columns
Divider props API
Default
Description
as"div" | "hr" | "span"Noprops"div"HTML tag to render ('div' | 'hr' | 'span').
classNamestringNostyling—Additional CSS class names for the divider root.
dashedbooleanNopropsfalseWhether the divider should be dashed instead of solid.
data-testidstringNotesting—Backward-compatible alias for test ID attributes.
decorativebooleanNopropstrueWhether the divider is purely decorative. When true, it is hidden from assistive technology. Default: true
labelstringNoprops—Accessible label for a meaningful separator. Only used when decorative is false.
labelledBystringNoprops—ID of an element that labels this separator. Only used when decorative is false.
lengthstringNoprops"100%"Length of the divider (e.g., "100%", "60px").
orientationOrientationTypeNoprops"horizontal"Orientation of the divider ('horizontal' | 'vertical'). Default is 'horizontal'.
stateStateTypeNostyling—State of the divider ('success' | 'error' | 'warning' | 'info' | 'disabled' | '').
testIdstringNopropsdataTestId ?? "divider"Optional test ID for testing frameworks.
themeThemeTypeNostylingconfigured default theme (fallback: "primary")Theme style to apply to the divider ('primary' | 'secondary' | 'tertiary' | 'quaternary' | 'clear').