Skip to content
Nana UI

Divider

View .md Download

A separator between content or layout regions. Supports text/icon labels, line styles, thickness and orientation.

Above

Below

Terminal window
npm install @nana-tec/ui-components
import "@nana-tec/ui-components/divider";
<div style="width:100%">
<p style="margin:0">Above</p>
<nana-divider></nana-divider>
<p style="margin:0">Below</p>
</div>
OR
Left Right

Properties

PropertyAttributeTypeDefaultDescription
decorativebooleanfalsePurely visual — removes the `separator` role from the a11y tree
insetbooleanfalsePull the rule in from the edges
labelstring | undefinedConvenience text label (equivalent to slotting text)
orientationDividerOrientation'horizontal'Line direction
thicknessDividerThickness'thin'Line thickness
variantDividerVariant'solid'Line style

Slots

SlotDescription
(default)Optional label content (text or an icon) centred in the rule

CSS parts

PartDescription
::part(line)The rule(s)
::part(label)The label wrapper

CSS custom properties

PropertyDescription
--nana-divider-colorLine colour
--nana-divider-thicknessLine thickness (overrides the `thickness` attribute)
--nana-divider-gradientGradient (gradient variant)
SlotDescription
(default)Optional label content (text or an icon) centred in the rule
VariableDefaultDescription
--nana-divider-colorLine colour
--nana-divider-thicknessLine thickness (overrides the thickness attribute)
--nana-divider-gradientGradient (gradient variant)
PartDescription
lineThe rule(s) — two <hr> elements when a label is present
labelThe label wrapper
Explore Divider interactively Every state, prop, and edge case — with live controls — in Storybook.
View in Storybook