Skip to main content

Divider

A divider that separates content.

Basic usage​

Basic usage
Spring water greener than the sky, a painted boat asleep in the rain.By the hearth, fair as the moon, white wrists like congealed frost and snow.
VerticalDivider
TopBottom
import { LhDivider } from '@lh-ui/react'

export default function Demo() {
return (
<>
<span>Spring water greener than the sky, a painted boat asleep in the rain.</span>
<LhDivider />
<span>By the hearth, fair as the moon, white wrists like congealed frost and snow.</span>
<LhDivider dashed />
<LhDivider labelPosition="left">Left-aligned group</LhDivider>
</>
)
}

Divider Props​

PropDescriptionTypeOptionsDefault
directionDirection'horizontal' | 'vertical'—'horizontal'
dashedDashed lineboolean—false
labelPositionLabel position (effective horizontally; always centered vertically)'left' | 'center' | 'right'—'center'
borderStyleBorder style (takes precedence over dashed when set explicitly)string'solid' | 'dashed' | 'dotted' …—
sxLayout shorthandSxProps——
Accessibility

A divider with a label renders as role="separator" (real grouping semantics); a purely decorative one renders as role="presentation" and is removed from the accessibility tree. aria-orientation="vertical" is output only when the divider has a label and is vertical.

Known behavior

borderStyle="dotted" outputs the lh-divider--dotted modifier, but the style layer currently only implements --dashed, so it falls back to a solid line — consistent with lh-ui-plus.

Styles​

import '@lh-ui/react/style/divider'