Browse documentation
Reference / Borders
Dividers between children
Draw borders between visible sibling elements by placing divider utilities on their parent.
Working example
- Cover stock
- Binding thread
- Endpapers
Use divide-y for a vertical stack and divide-x for a horizontal row. The first visible child keeps its leading edge clear.
<ul class="divide-y divide-dashed divide-neutral-400">
<li class="py-2">Cover stock</li>
<li class="py-2">Binding thread</li>
<li class="py-2">Endpapers</li>
</ul>Class reference
| Class | CSS declarations |
|---|---|
divide-y | border-block-start-width: 1px; |
divide-x | border-inline-start-width: 1px; |
divide-y-2 | border-block-start-width: 2px; |
divide-dashed | border-style: dashed; |
divide-neutral-300 | border-color: oklch(0.83 0 0); |
View full generated CSS
.divide-dashed > :where(:not([hidden]) ~ :not([hidden])) {
border-style: dashed;
}
.divide-neutral-300 > :where(:not([hidden]) ~ :not([hidden])) {
border-color: oklch(0.83 0 0);
}
.divide-x > :where(:not([hidden]) ~ :not([hidden])) {
border-inline-start-width: 1px;
}
.divide-y > :where(:not([hidden]) ~ :not([hidden])) {
border-block-start-width: 1px;
}
.divide-y-2 > :where(:not([hidden]) ~ :not([hidden])) {
border-block-start-width: 2px;
}