Divider
Divider
is used to visually separate content in a list or group.
#
Importimport { Divider } from "pearl-ui";
#
Usage<Divider />
#
Divider orientationUse the orientation
prop to change the direction of the divider.
<Divider orientation="horizontal" />
<Divider orientation="vertical" />
#
Override StyleThe Divider component also supports a variety of style props which can be used to override the pre-defined style in the theme. Manual style props passed into the component have a higher precedance than the default component style.
// passing style prop bg="red" overrides the default component style value of bg="neutral.300"<Divider bg="red" />
#
Example#
Props#
Supported style propsThe Divider
component supports the following style props:
- backgroundColor (Only
backgroundColor
props are supported, not thecolor
prop) - layout
- position
- opacity and visiblity
- margin and padding
#
Additional propsName | Required | Type | Default | Description |
---|---|---|---|---|
size | false | The size of the divider | ||
variant | false | The variant of the divider | ||
thickness | false | 1 | The thickness of the divider | |
length | false | "100%" | The length of the divider | |
orientation | false | "horizontal" | The direction of the divider |
#
Default Component Styleexport default { baseStyle: { orientation: "horizontal", bg: { light: "neutral.300", dark: "neutral.900", }, thickness: 1, length: "100%", },};