Divider
Separates blocks of content with a horizontal line; an optional short text can sit on the line.
zb:divider zubazar/ui · free (MIT)
Basic usage
BLADE
Without content, a thin horizontal line (<hr>) is drawn; set the space above and below with class, e.g. my-4.
<p class="text-sm text-dim">The customer details were updated.</p>
<zb:divider class="my-4" />
<p class="text-sm text-dim">Next invoice: October 14, 2026.</p>
| Prop | Values |
|---|---|
class | Spacing classes, e.g. my-4 |
With text
BLADE
A short text in the slot is shown in the middle of the line; suited to the "or" separator on sign-in screens.
<zb:button class="w-full">Sign in with email</zb:button>
<zb:divider>or</zb:divider>
<zb:button variant="white" class="w-full">Sign in with phone number</zb:button>
Text alignment
BLADE
align picks where the text sits (default center); use start to title form sections.
<zb:divider align="start">Personal details</zb:divider>
<zb:divider>Address</zb:divider>
<zb:divider align="end">End</zb:divider>
| Prop | Values |
|---|---|
align | start | center | end |
Line style
BLADE
variant picks the line style (default solid); it works the same with or without text.
<zb:divider />
<zb:divider variant="dashed" />
<zb:divider variant="dotted">Archive</zb:divider>
| Prop | Values |
|---|---|
variant | solid | dashed | dotted |
Props
The values the component takes. What are props and slots?
| Prop | Type | Default | Description |
|---|---|---|---|
align | — | center | start · center · end (when there is text) |
variant | — | solid | solid · dashed · dotted |
Slots: default content (optional divider text)