Browse documentation

Reference / Borders

Dividers between children

Draw borders between visible sibling elements by placing divider utilities on their parent.

Working example

Use divide-y for a vertical stack and divide-x for a horizontal row. The first visible child keeps its leading edge clear.

HTML
<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

ClassCSS declarations
divide-yborder-block-start-width: 1px;
divide-xborder-inline-start-width: 1px;
divide-y-2border-block-start-width: 2px;
divide-dashedborder-style: dashed;
divide-neutral-300border-color: oklch(0.83 0 0);
View full generated CSS
Compiled 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;
}