Divider
A one-pixel line in the theme’s border color, horizontal by default (vertical=True for a vertical one). pz.rule is the base version with your own color and thickness.
ui.divider · Category: Display · Full reference →


pz.column([ ui.label("Account"), ui.divider(), pz.row([ui.label("Edit"), ui.divider(vertical=True), ui.label("View"), ui.divider(vertical=True), ui.label("Help")], spacing=12, height=20), ui.divider(), ui.muted("Sign out"),], spacing=10, width=300)When to use
Section titled “When to use”- To separate groups in a column or items in a toolbar.
- Prefer spacing first; add a divider when groups really need a visual break.
import pyzed as pzfrom pyzed import ui
pz.column([ ui.label("Account"), ui.divider(), pz.row([ui.label("Edit"), ui.divider(vertical=True), ui.label("View"), ui.divider(vertical=True), ui.label("Help")], spacing=12, height=20), ui.divider(), ui.muted("Sign out"),], spacing=10, width=300)Variants
Section titled “Variants”Direction
Section titled “Direction”

Code
pz.column([ui.label("Account"), ui.divider(), ui.label("Sign out")], spacing=8, width=220)

vertical=TrueCode
pz.row([ui.label("Edit"), ui.divider(vertical=True), ui.label("View")], spacing=10, height=18)

color="accent"Code
pz.container(ui.divider(color="accent"), width=220)

pz.rule(thickness=3)Code
pz.container(pz.rule(color="#e5c07b", thickness=3), width=220)States and events
Section titled “States and events”

label="or"Code
pz.container(ui.divider(label="or"), width=300)

spacing=12Code
pz.column([ui.label("Above"), ui.divider(spacing=12), ui.label("Below")], width=300)Events
Section titled “Events”Divider has no events of its own: it shows what you give it. Like every widget it also has the 18 common events (click, double_click, right_click, mouse_enter, drag, key_down, resize…), attached with .on(...): see Events and Events of every component.
Properties and API
Section titled “Properties and API”ui.divider
Section titled “ui.divider”divider(*, vertical=False, color=None, label=None, spacing=0, theme=None)A divider line in the theme color.
| Property | Default | Description |
|---|---|---|
vertical |
False |
Vertical instead of horizontal. |
color |
None |
Text or icon color. |
label |
None |
Muted text in the middle of a horizontal line ("or", a date…). |
spacing |
0 |
Space on both sides of the line. |
theme |
None |
Theme to use instead of the current one (pyzed.theme.current()). |
pz.rule
Section titled “pz.rule”rule(*, vertical=False, thickness=1.0, color=None)A horizontal (or vertical) divider line.
| Property | Default | Description |
|---|---|---|
vertical |
False |
Vertical line instead of horizontal. |
thickness |
1.0 |
Thickness in pixels. |
color |
None |
Text or icon color. |