Indicator
A small colored dot. color is a theme token or a hex color and size its diameter.
ui.indicator · Category: Display · Full reference →


pz.column([ pz.row([ui.indicator("success"), ui.label("Server running")], spacing=8, align="center"), pz.row([ui.indicator("warning"), ui.label("Reconnecting")], spacing=8, align="center"), pz.row([ui.indicator("error"), ui.label("Build failed")], spacing=8, align="center"), pz.row([ui.indicator(size=10), ui.label("Unsaved changes")], spacing=8, align="center"),], spacing=10)When to use
Section titled “When to use”- Next to a name to show presence (online, busy) or a state (running, failed).
- On a tab or list item to mark unsaved changes.
import pyzed as pzfrom pyzed import ui
pz.column([ pz.row([ui.indicator("success"), ui.label("Server running")], spacing=8, align="center"), pz.row([ui.indicator("warning"), ui.label("Reconnecting")], spacing=8, align="center"), pz.row([ui.indicator("error"), ui.label("Build failed")], spacing=8, align="center"), pz.row([ui.indicator(size=10), ui.label("Unsaved changes")], spacing=8, align="center"),], spacing=10)Variants
Section titled “Variants”

"accent"Code
ui.indicator()

"success"Code
ui.indicator("success")

"warning"Code
ui.indicator("warning")

"error"Code
ui.indicator("error")

"text_muted"Code
ui.indicator("text_muted")

"#c678dd"Code
ui.indicator("#c678dd")

size=6Code
ui.indicator("success", size=6)

size=10Code
ui.indicator("success", size=10)

size=14Code
ui.indicator("success", size=14)Next to text
Section titled “Next to text”

Code
pz.row([ui.indicator("success"), ui.label("Ana is online")], spacing=8, align="center")

Code
pz.row([ui.label("notes.py"), ui.indicator(size=8)], spacing=6, align="center")Events
Section titled “Events”Indicator 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.indicator
Section titled “ui.indicator”indicator(color='accent', *, size=6, theme=None)A colored dot (status, unsaved changes, presence).
| Property | Default | Description |
|---|---|---|
color |
"accent" |
Token or color. |
size |
6 |
Diameter. |
theme |
None |
Theme to use instead of the current one (pyzed.theme.current()). |