Skip to content

Indicator

A small colored dot. color is a theme token or a hex color and size its diameter.

ui.indicator · Category: Display · Full reference →

IndicatorIndicator
  • 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 pz
from 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)
Indicator: "accent"Indicator: "accent"
"accent"
Code
ui.indicator()
Indicator: "success"Indicator: "success"
"success"
Code
ui.indicator("success")
Indicator: "warning"Indicator: "warning"
"warning"
Code
ui.indicator("warning")
Indicator: "error"Indicator: "error"
"error"
Code
ui.indicator("error")
Indicator: "text_muted"Indicator: "text_muted"
"text_muted"
Code
ui.indicator("text_muted")
Indicator: "#c678dd"Indicator: "#c678dd"
"#c678dd"
Code
ui.indicator("#c678dd")
Indicator: size=6Indicator: size=6
size=6
Code
ui.indicator("success", size=6)
Indicator: size=10Indicator: size=10
size=10
Code
ui.indicator("success", size=10)
Indicator: size=14Indicator: size=14
size=14
Code
ui.indicator("success", size=14)
Indicator: OnlineIndicator: Online
Online
Code
pz.row([ui.indicator("success"), ui.label("Ana is online")], spacing=8, align="center")
Indicator: UnsavedIndicator: Unsaved
Unsaved
Code
pz.row([ui.label("notes.py"), ui.indicator(size=8)], spacing=6, align="center")

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.

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()).

Full reference →