Components
Divider

Divider

The Divider component is a versatile UI element used to create visual separation between content sections, groups, or list items. It helps improve readability and provides a clean, structured layout in user interfaces.

Import

import { VKDivider } from "@vivakits/react-components";

Direction

The Divider component supports both horizontal and vertical orientations using the direction prop.

Horizontal
Vertical

Color

The Divider component comes with 7 different colors that you can change using the color prop.

Primary
Secondary
Accent
Success
Warning
Danger
Dark

Variant

The Divider supports different line styles through the variant prop.

Solid
Dashed
Dotted

Thickness

The Divider thickness can be customized using the thickness prop.

Thin
Medium
Thick
Custom (8px)

Position

The content position can be adjusted using the position prop.

Start
Center
End

Inset

The Divider can be inset from its container using the inset prop.

No Inset
Small Inset
Large Inset
Custom Inset (32px)

Content Color

The color of the content text can be customized independently using the contentColor prop.

Success Text
Warning Text
Danger Text
Primary Text
Secondary Text
Accent Text

API Reference

AttributeTypeDescriptionDefault
directionhorizontalverticalSets the direction of the dividerhorizontal
colorprimarysecondaryaccentsuccesswarningdangerdarklightSets the color of the dividerdark
variantsoliddasheddottedSets the style of the divider linesolid
thicknessthinmediumthickstringnumberSets the thickness of the dividerthin
childrenReactNodeContent to display within the divider-
contentColorprimarysecondaryaccentsuccesswarningdangerdarklightSets the color of the content textdark
contentMaxSizexssmmdlgxlstringnumberSets the maximum size of the content within the divider-
positionstartcenterendSets the position of the contentcenter
insetnonesmmdlgxlstringnumberSets the margin space on both sidesnone
sizestring | numberSets the width (horizontal) or height (vertical)auto/100%
classNamestringAdditional CSS classes-
contentWrapperClassNamestringAdditional CSS classes for content wrapper-
dividerWrapperClassNamestringAdditional CSS classes for divider wrapper-