Skip to content

Divider Component

Divider Component

The divider component is used to separate content groups, visually dividing content to better organize page structure.

Basic Usage

The most basic divider, horizontal by default.

This is the content above the divider

This is the content below the divider

Show CodeArrow
CopyGitHub

Direction

Dividers have two directions: horizontal and vertical, with horizontal being the default.

Horizontal divider (default)

Vertical divider

TextTextText
Show CodeArrow
CopyGitHub

Different Styles

Dividers support different border styles: solid (default), dashed, dotted, and double.

Solid divider (default)

Dashed divider

Dotted divider

Double divider

Show CodeArrow
CopyGitHub

Divider with Text

You can embed text content in the divider and customize the text position.

Default center

Left aligned

Right aligned

Show CodeArrow
CopyGitHub

Divider API

Attributes

AttributeDescriptionTypeAccepted ValuesDefault
directionDivider directionstringhorizontal / verticalhorizontal
borderStyleDivider stylestringsolid / dashed / dotted / doublesolid
contentPositionText positionstringleft / center / rightcenter

Slots

Slot NameDescription
defaultText content in divider

Style Variables

The divider component uses the following style variables, which can be customized through SCSS variables:

Variable NameDescription
$border-color-defaultDivider color
$text-color-defaultText color
$bg-color-defaultBackground color
$font-size-defaultDefault font size

Released under the MIT License