Dividers
Dividers
let you create dividers freely within components. They’re awesome for segmenting content and creating visual hierarchy.
-->
Dividers
let you create dividers freely within components. They’re awesome for segmenting content and creating visual hierarchy.
You can use Divider-horizontal
and Divider-vertical
to create the divider you want.
Add text in the Divider
to create a labelled divider. For vertical labelled dividers, make sure there’s sufficient height or the dividers will not be visible!
To create dividers between multiple items, you can use DividerBetween
instead of Divider
.
There are two kinds of dividers:
Divider-<direction>
: Creates a divider elementDividerBetween-<direction>
: Creates a divider between elementsYou can create horizontal dividers with Divider-horizontal
.
If dividers are placed in a component that contains padding, you can break out of the padding with Breakout
(which are simply negative margins).
You can create a vertical divider with Divider-vertical
. Please note that vertical dividers only work in Flexbox containers.
Likewise, if your dividers are placed in a component that contains padding, you can break out of the padding with Breakout
(which are simply negative margins).
You can use a combination of dividers to create a pretty complex card layout.
By the way, this kind of layout is best built with the
Card
component.
You can create a horizontal labelled divider by adding the label in the Divider
element.
Likewise, you can create a vertical labelled divider by adding the label in the Divider
element. Bonus: You can also rotate the text to make it look cooler with Writing
classes from Splendid Styles!
You can change the gap between the label and the divider with the gap
property or the --gap
variable.
DividerBetween
creates a divider between two or more elements.
You can create horizontal dividers between elements with DividerBetween-horizontal
. It uses border-top
on subsequent elements to create the divider.
You can create vertical dividers between elements with DividerBetween-vertical
. It uses border-left
on subsequent elements to create the divider.
When you us DividerBetween
, you have to remove any gap
between
elements the whitespace would look awkward.
The Card-split
component which handles this for you automatically so it’s best to use DividerBetween
with it. But if you’re not using Card-split
, you can manually set gap
to 0
.
Splendid Labz is free because we love developers and we want to contribute back to the ecosystem.
We only charge for access to the documentation to keep the project going. If you don't wish to pay, feel free to use the content from the features tab, our blogs or our videos as your guide.
There are two kinds of dividers:
Divider-<direction>
: Creates a divider elementDividerBetween-<direction>
: Creates a divider between elementsYou can create horizontal dividers with Divider-horizontal
.
If dividers are placed in a component that contains padding, you can break out of the padding with Breakout
(which are simply negative margins).
You can create a vertical divider with Divider-vertical
. Please note that vertical dividers only work in Flexbox containers.
Likewise, if your dividers are placed in a component that contains padding, you can break out of the padding with Breakout
(which are simply negative margins).
You can use a combination of dividers to create a pretty complex card layout.
By the way, this kind of layout is best built with the
Card
component.
You can create a horizontal labelled divider by adding the label in the Divider
element.
Likewise, you can create a vertical labelled divider by adding the label in the Divider
element. Bonus: You can also rotate the text to make it look cooler with Writing
classes from Splendid Styles!
You can change the gap between the label and the divider with the gap
property or the --gap
variable.
DividerBetween
creates a divider between two or more elements.
You can create horizontal dividers between elements with DividerBetween-horizontal
. It uses border-top
on subsequent elements to create the divider.
You can create vertical dividers between elements with DividerBetween-vertical
. It uses border-left
on subsequent elements to create the divider.
When you us DividerBetween
, you have to remove any gap
between
elements the whitespace would look awkward.
The Card-split
component which handles this for you automatically so it’s best to use DividerBetween
with it. But if you’re not using Card-split
, you can manually set gap
to 0
.
Here’s the CSS for Divider
.
Splendid Labz is free because we love developers and we want to contribute back to the ecosystem.
We only charge for access to the documentation to keep the project going. If you don't wish to pay, feel free to use the content from the features tab, our blogs or our videos as your guide.
Here’s the CSS for Divider
.
Name | Default | Description |
---|---|---|
width | auto | Width of the divider. Used in Divider-vertical if you don’t wanna use --border-width . |
height | auto | Width of the divider. Used in Divider-horizontal if you don’t wanna use --border-width .divider |
Variable | Default | Description |
---|---|---|
--border-width | 1px | Width of the divider |
--border-color | currentColor | Color of the divider |
--gap | 1rem | Gap between dividers and their labels |
Splendid Labz is free because we love developers and we want to contribute back to the ecosystem.
We only charge for access to the documentation to keep the project going. If you don't wish to pay, feel free to use the content from the features tab, our blogs or our videos as your guide.
Name | Default | Description |
---|---|---|
width | auto | Width of the divider. Used in Divider-vertical if you don’t wanna use --border-width . |
height | auto | Width of the divider. Used in Divider-horizontal if you don’t wanna use --border-width .divider |
Variable | Default | Description |
---|---|---|
--border-width | 1px | Width of the divider |
--border-color | currentColor | Color of the divider |
--gap | 1rem | Gap between dividers and their labels |