Heading
A semibold title. level=1 (default), 2 or 3 pick the size, so headings stay consistent across screens.
ui.heading · Category: Display · Full reference →


pz.column([ ui.heading("Heading 1"), ui.heading("Heading 2", level=2), ui.heading("Heading 3", level=3), ui.muted("Body text below the headings."),], spacing=6)When to use
Section titled “When to use”- For the title of a page, a dialog section or a settings group.
- For a small uppercase list title, use List header.
import pyzed as pzfrom pyzed import ui
pz.column([ ui.heading("Heading 1"), ui.heading("Heading 2", level=2), ui.heading("Heading 3", level=3), ui.muted("Body text below the headings."),], spacing=6)Variants
Section titled “Variants”

level=1Code
ui.heading("Project settings")

level=2Code
ui.heading("Project settings", level=2)

level=3Code
ui.heading("Project settings", level=3)

level=4Code
ui.heading("Project settings", level=4)

color="accent"Code
ui.heading("Welcome back", level=2, color="accent")

Code
pz.column([ui.heading("Billing", level=2), ui.muted("Invoices and payment methods.")], spacing=4)Events
Section titled “Events”Heading 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.heading
Section titled “ui.heading”heading(content, *, level=1, theme=None, **kwargs)A semibold heading.
| Property | Default | Description |
|---|---|---|
content |
required | Content: a Widget, a string or a number (converted to text). |
level |
1 |
1 (26 px), 2 (20 px), 3 (16 px) or 4 (13.5 px). |
theme |
None |
Theme to use instead of the current one (pyzed.theme.current()). |
**kwargs |
— | Same as label. |