Skip to main content

Divider

Horizontal or vertical divider line with theme-aware styling.

Basic Usage

import { Divider } from '@multinaire/ui';

<Divider />

Props

PropTypeDefaultDescription
horizontalbooleanfalseSet to true to render a vertical divider instead of horizontal
marginSpacingPropsMargin around the divider
thicknessnumber1Thickness of the divider line in pixels

Examples

Horizontal Divider

<Container>
<Typography>Section 1</Typography>
<Divider margin={{ vertical: 16 }} />
<Typography>Section 2</Typography>
</Container>

Vertical Divider

<Container horizontal alignItems="center">
<Typography>Left</Typography>
<Divider horizontal={false} margin={{ horizontal: 16 }} />
<Typography>Right</Typography>
</Container>

Custom Thickness

<Divider thickness={2} />

In a List

<Container>
{items.map((item, index) => (
<React.Fragment key={item.id}>
<Typography>{item.name}</Typography>
{index < items.length - 1 && (
<Divider margin={{ vertical: 8 }} />
)}
</React.Fragment>
))}
</Container>