Skip to content

Divider

Status: stableAccessibility reviewedtenet-ui@0.4.0
Import
import { Divider } from 'tenet-ui';

Also accepts every prop of HTMLAttributes<HTMLDivElement>.

Source: src/components/Divider/Divider.tsx

When to use: a thin rule that separates content groups — sections of a menu, columns in a toolbar, an “or” between two choices.

  • It renders role="separator" with the correct aria-orientation, so it’s a real separator, not a decorative border. Use it instead of a styled <hr> or a bordered <div>.
  • Use a labelled horizontal divider (“or”) to split alternative actions; keep the label one or two words.
  • Vertical dividers need a flex parent with a height to stretch against.
  • Don’t stack dividers to fake spacing — reach for Stack gaps for layout and a divider only when a visible rule communicates a boundary.
  • <Divider /> · <Divider>or</Divider>
  • <Stack direction="horizontal"><span>A</span><Divider orientation="vertical" /><span>B</span></Stack>
  • <hr style={{opacity:.2}} /> — off-system thickness/color.
3 stories for Divider — open in Storybook

The full matrix (all args, controls, accessibility panel) is in Storybook.

PropTypeDefaultDescription
orientation'horizontal' | 'vertical'
DividerOrientation
horizontalLayout direction.
childrenReactNodeOptional centered label (horizontal only).