Skip to main content

Separator

A thin line divider. Supports horizontal and vertical orientations, solid / dashed / dotted line styles, custom thickness, and colour.

Preview

import { Separator } from '@devraj-labs/vajra-ui-core';

// Between list items
<ItemA />
<Separator color="#E5E7EB" />
<ItemB />

Usage

import { Separator } from '@devraj-labs/vajra-ui-core';

// Between list items
<ItemA />
<Separator color="#E5E7EB" />
<ItemB />

// Vertical divider inside a Row
<Row h={48} align="center">
<StatA />
<Separator orientation="vertical" color="#E5E7EB" />
<StatB />
</Row>

API

PropTypeDefaultDescription
orientation'horizontal' | 'vertical''horizontal'Direction of the line
thicknessnumber1Line thickness in pixels
colorstring'#000'Line colour
variant'solid' | 'dashed' | 'dotted''solid'Line style
  • Horizontal separators stretch to width: '100%'
  • Vertical separators stretch to height: '100%', the parent must have an explicit height for this to be visible

Example

Separator example