Divider

A divider component that creates a horizontal or vertical line to separate content. It supports line thickness, style type, and can include content in the middle.

Source


One

Two

Three

Props

NameDefaultType
size1number string
Divider line thickness
typesolid'solid' | 'dashed' | 'dotted'
Divider line style
verticalfalseboolean
Makes the divider vertical instead of horizontal
height100%number string
Height for a vertical divider. Pass it when vertical is true

Slots

NameAcceptsDescription
defaultanyContent to be displayed in the middle of the divider (creates a text divider)

Tokens

CSS variable tokens used for global or per-instance manipulation of certain styling.

TokenDefaultDescription
--vui-divider-size1pxLine thickness
--vui-divider-height100%Vertical divider height
--vui-divider-typesolidBorder style
--vui-divider-colorvar(--color-border)Line color
--vui-divider-slot-outline-colorvar(--color-bg)Slot label outline color