Primals
Divider

Divider Component

The Divider component is a styled horizontal rule (<hr>) element that can be used to create a visual division in your application.

Props

The Divider component accepts the following props:

PropDescriptionType
colorA string that sets the color of the Divider.String
sizeA string that sets the size of the Divider.String
styleA string that sets the style of the Divider.String
widthA string that sets the width of the Divider.String
bgA string that sets the background color of the Divider.String
backgroundColorA string that sets the background color of the Divider.String
wA string that sets the width of the Divider.String
hA string that sets the height of the Divider.String
pA string that sets the padding of the Divider.String
ptA string that sets the top padding of the Divider.String
prA string that sets the right padding of the Divider.String
pbA string that sets the bottom padding of the Divider.String
plA string that sets the left padding of the Divider.String
pxA string that sets the horizontal padding of the Divider.String
pyA string that sets the vertical padding of the Divider.String
paddingA string that sets the padding of the Divider.String
mA string that sets the margin of the Divider.String
mtA string that sets the top margin of the Divider.String
mbA string that sets the bottom margin of the Divider.String
mrA string that sets the right margin of the Divider.String
mlA string that sets the left margin of the Divider.String
mxA string that sets the horizontal margin of the Divider.String
myA string that sets the vertical margin of the Divider.String
marginA string that sets the margin of the Divider.String

Examples


<Divider
  color="red-500"
  size="8px"
  style="dashed"
  width="100%"
/>

Default



Vertical

To make a vertical divider you need to wrap it in a flex element and as long as there is height to the flex element it will create a vertical divider.


 

 

This is the code for the above example

<Flex direction="row">
  <Box h="24">&nbsp;</Box>
  <Divider />
  <Box h="24">&nbsp;</Box>
</Flex>