Divider
The divider component provides a thin, unobtrusive line for grouping elements to reinforce visual hierarchy.
Introduction
The Archi-UI Divider component renders as a dark gray <hr>
by default, and features several useful props for quick style adjustments.
Basic Divider
Preview
Toothbrush
$4.50
Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati natus id, expedita culpa iure earum? Vel harum blanditiis accusantium illum!
Select type
Usage
import { Divider } from 'archi-ui'
<Divider />
Variant
The Divider component supports three variants: fullwidth
(default), inset
, and middle
.
Preview
- Full width variant below
- Inset variant below
- Middle variant below
- List item
Orientation
Use the orientation
prop to change the Divider from horizontal to vertical. When using vertical orientation, the Divider renders a <div>
with the corresponding accessibility attributes instead of <hr>
.
Preview
Cut
Copy
Paste
Select All
With children
Use the textAlign
prop to align elements that are wrapped by the Divider.
Preview
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Laudantium doloribus labore sequi, alias impedit vel.
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Laudantium doloribus labore sequi, alias impedit vel.
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Laudantium doloribus labore sequi, alias impedit vel.
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Laudantium doloribus labore sequi, alias impedit vel.
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Laudantium doloribus labore sequi, alias impedit vel.
Divider API
API reference docs for the React Divider component.
Props
Name | Type | Default | Description |
---|---|---|---|
children | node | - | The content of the component. |
className | string | - | Override or extend the styles applied to the component. |
light | bool | false | If true , the divider will have a lighter color. |
orientation | 'horizontal' | 'vertical' | 'horizontal' | The component orientation. |
textAlign | 'center' | 'start' | 'end' | center | The text alignment. |
variant | 'fullwidth' | 'middle' | 'inset' | 'fullwidth' | The variant to use. |
thickness | 'thin' | 'normal' | 'thick' | thin | The thickness of the divider component. |