Divider
Our Divider component is a styled horizontal rule. It is a 20% opacity black single line to maintain its contrast on a variety of (light) background colours.
GitHub, opens in a new tab·Storybook, opens in a new tab·Playroom, opens in a new tab·Figma, opens in a new tab
Installation
bash
npm install @nib-components/divider
Usage
jsx
import Divider from '@nib-components/divider';
Interactive demo
jsx
Props
Prop | Type | Default | Description |
---|---|---|---|
color | string | default | sets the color for the Divider component. Can be any of the validBorderColorValues |
size | string | fine | sets the size for the Divider component. Value(s) must be a valid css value with units or valid borderWidth token values none , fine , thin , medium or thick |
Considerations
The Divider component does not include spacing. You must handle this separately by using the appropriate layout component.
It is recommended to utilize the default properties for the divider. If customization is required, please consult with your designer to ensure consistency with the design specifications.