Backpack UI
Components
Divider

Divider

The Divider component is used to display a styled horizontal line to separate content sections.



Import

To use the Divider component, you need to import it from the @ef-global/backpack package:


_10
import { Divider } from '@ef-global/backpack/Divider';

Usage


_10
<Divider />

Props

PropTypeDescription
colorstringCustom color for the divider.
inversebooleanIf true, sets the inverse color theme for the divider.
styleCSSPropertiesInline styles for the divider.
classNamestringCustom classname to apply additional CSS styles to divider.

Examples

Here are some examples of how to use the Divider component:

Default




_10
<Divider />

With Color




_10
<Divider color="pink" />

Inverse




_10
<Divider inverse={true} />

With Inline Styles




_10
<Divider
_10
style={{
_10
margin: '40px 20px',
_10
boxShadow: '0 0 10px 10px purple',
_10
'--color-divider': 'yellow',
_10
}}
_10
/>

With Custom Classname


_10
<Divider className="my-class" />