Skip to content

Divider

<bh-divider> | BharatDivider

The Divider component visually separates content using horizontal or vertical lines. It is highly customizable using width, height, color, and margin properties.

Basic Usage

Variants

Use the variant attribute to set the orientation.

Open in flex-shrink: 0; flex-shrink: 0;
Vertical Divider
Horizontal Divider
VariantDescription
horizontalDefault horizontal divider
verticalVertical divider (set height!)

Custom Styling

You can control the appearance of the divider using width, height, background color, and margins.

Properties

PropertyTypeDescription
variantstring"horizontal" (default) or "vertical"
widthstringWidth of the divider (applies to vertical height)
heightstringHeight of the divider (applies to vertical width)
backgroundColorstringBackground color of the divider
marginTopstringTop margin
marginBottomstringBottom margin
marginLeftstringLeft margin
marginRightstringRight margin