Skip to content

Separator ​

A line between blocks of a page or between buttons of a toolbar.

Installation ​

ts
import { NuiSeparator } from '@numior/kit';

Usage ​

Change the direction and the label of the line.

orientation
A horizontal line, or a vertical one between items in a row.

Text in the middle of a horizontal line, also the name of the separator for screen readers.

Examples ​

Divide toolbar buttons ​

Set orientation="vertical", and the line takes the height of the row.

Accessibility ​

A screen reader announces the line as a separator between parts of the page. When the line is only decoration, pass decorative, and the screen reader skips it.

The text from label or the slot becomes the name of the separator, and the screen reader reads it along with the role.

API ​

Props

Name
Type
Default
Description
orientation
NuiSeparatorOrientation
"horizontal"
A horizontal line, or a vertical one between items in a row.
decorative
boolean
false
Hides the line from screen readers when it is purely decorative.
label
string
—
Text in the middle of a horizontal line, also the name of the separator for screen readers.

Slots

Name
Slot props
Description
default
any
Markup in place of the label text.

Edit this page

Search

Esc