Skip to content

Divider ​

A divider visually separates content sections or components within a layout, providing structure and enhancing readability by creating distinct visual breaks.

Overview ​

catnip-divider renders a native <hr> and styles it with a single visible border edge (horizontal: border-top; vertical: border-left).

Look and layout ​

  • Orientation — Horizontal by default (orientation="horizontal"). With orientation="vertical", the rule runs vertically; the parent should give it a defined height (for example flex or grid).
  • Appearance — Maps to border-style on that edge: solid, dashed, dotted, double.
  • Size — Stroke thickness: s → 1px, m → 2px, l → 4px.
  • Shape — round (default): pill-style caps via border-radius. square: square corners.

Color ​

The line uses currentColor on the host, so it follows the color you set on catnip-divider (or inherited from ancestors). The host defaults to var(--color-stroke-small-item). There is no color prop — keep tokens and theming in CSS.

Behaviour for assistive technology (decorative, dividerAriaLabel, roles) is covered on the Accessibility tab; prop reference is on the Specs tab.

Live example ​

Guidelines ​

  • Use horizontal dividers between stacked blocks of content.
  • Use vertical dividers inside toolbars or split layouts with a clear height on the flex (or grid) container.

Catnip Design System by Signicat