ClickorKeyboard shortcut Alt + L

Dragto resize

Nord Design System SearchDeveloperDeveloperGetting startedUsing Web ComponentsWebfontsCDNLocalizationCSS Framework Legacy ESLint PluginWorking with AIFAQDesignDesignGetting startedFoundationsAccessibilityColor SystemColor UtilitiesPrinciplesFigma ToolkitGridIconographyNamingNordhealth BrandTypographyThemesBrand assetsToolsComponentsComponentsAccordion New Aside New Autocomplete New AvatarBadgeBanner Updated ButtonButton GroupCalendar Updated Card Updated Chart New Checkbox Updated Collapsible New Combobox New Command MenuDate Picker Updated Date Range Picker New DividerDrawer Updated DropdownEmpty StateField New FieldsetFilter Bar New FooterHeaderIconInput Updated Input Group New Item New Kbd New LayoutMessageMeter New Modal Updated NavigationNotificationNumber Field New Otp Field New Outline New Overflow List New Pagination New Popout Updated ProgressProgress BarQrcodeRadio Updated Range Updated Resizable New Rich Text Editor New Scroll Area New Segmented ControlSelect Updated SkeletonSpinnerStackTabTableTagTextarea Updated Time Picker New Timestamp New ToastToggle Updated TooltipTop BarTruncate New Visually HiddenDesign TokensDesign TokensTailwind CSSTailwind CSSBlocksBlocksTemplatesTemplatesIconsIconsPlaygroundPlaygroundLatest UpdatesLatest UpdatesChangelogChangelogMigration guidesMigration guides
GitHub

Clickto expandKeyboard shortcut Alt + L

Divider

Open in Storybook

Dividers separate and distinguish sections of content or groups of menu items.

Loading...

Usage

Divider draws a horizontal or vertical line to separate sections of content or groups of items. It takes no content — place it between the things you want to divide.

import "@nordhealth/components/lib/Divider"

Examples

Horizontal

A horizontal divider (the default) separates stacked content.

Vertical

Set direction="vertical" to separate items laid out in a row.

Color

Override --n-divider-color to change the line color.

Size

Override --n-divider-size to change the line thickness.

Inside a card

Use a divider to separate sections within a Card, such as a header from its body.

RTL

Dividers follow the document or container direction. Toggle the direction to see the layout mirror.

Accessibility

  • Divider applies role="separator" automatically, exposing it to assistive technology as a section break.
  • The aria-orientation attribute is kept in sync with the direction attribute, so a vertical divider is announced as a vertical separator.
  • Divider is decorative structure, not a focus target — it is not keyboard focusable and carries no interactive behaviour.

API reference

Divider

Divider components are used to separate and distinguish sections of content or groups of menu items. Visually, they look like horizontal or vertical lines.

<nord-divider></nord-divider>

Props

PropertyAttribute Description TypeDefault
directiondirectionThe direction of the divider.'vertical' | 'horizontal''horizontal'

CSS Properties

CSS Custom Properties provide more fine grain control over component presentation. We advise utilizing existing properties on the component before using these.

PropertyDescriptionDefault
--n-divider-colorControls the color of the divider, using our color tokens.var(--n-color-border)
--n-divider-sizeControls the size, or thickness, of the divider.1px
Design guidelinesFor designers

Usage

This section includes guidelines for designers and developers about the usage of this component in different contexts.

Do

  • Use to represent thematic breaks between elements.
  • Use when you need to divide sections of content from each other.
  • Use to separate content into clear groups.
  • Use dividers sparingly, to create groupings or to separate items.

Don’t

  • Avoid using for presentational purposes only.
  • Don’t use strong colors in dividers.
  • Don’t use dividers for replacing card components.

Additional considerations

  • Divider uses a role called separator which indicates that the element is a divider that separates and distinguishes sections of content or groups of menu items. The implicit ARIA role of the native thematic break (<hr> element) is a separator.
  • Dividers have an implicit aria-orientation value of horizontal which can be changed using the direction property.
  • For more details, please see ARIA: separator role on MDN.