Status bar
The bottom bar with items at the start and end. ui.status_item shows an icon and/or text, can be pressed, selected (a dock that is open) and carry a tooltip with keys.
ui.status_bar · Category: Workspace · Full reference →


ui.status_bar( [ui.status_item(icon="panel-left", on_press=on_toggle, selected=True, tooltip="Project panel", keys="ctrl-b"), ui.status_item("0", icon="circle-x"), ui.status_item("2", icon="triangle-alert", icon_color="warning")], [ui.status_item("Ln 12, Col 8"), ui.status_item("UTF-8"), ui.status_item("Python", icon="file-code")],)When to use
Section titled “When to use”- For always-visible state: errors and warnings, cursor position, language, git branch.
from pyzed import ui
ui.status_bar( [ui.status_item(icon="panel-left", on_press=on_toggle, selected=True, tooltip="Project panel", keys="ctrl-b"), ui.status_item("0", icon="circle-x"), ui.status_item("2", icon="triangle-alert", icon_color="warning")], [ui.status_item("Ln 12, Col 8"), ui.status_item("UTF-8"), ui.status_item("Python", icon="file-code")],)Variants
Section titled “Variants”

Code
ui.status_item("Ln 12, Col 8")

icon=Code
ui.status_item("Python", icon="file-code")

icon_color="warning"Code
ui.status_item("2", icon="triangle-alert", icon_color="warning")

selected=TrueCode
ui.status_item(icon="panel-left", on_press=on_toggle, selected=True)

color="accent"Code
ui.status_item("main", icon="git-branch", color="accent")

start=, end=Code
pz.container(ui.status_bar([ui.status_item("0", icon="circle-x")], [ui.status_item("UTF-8"), ui.status_item("Python")]), width=420)Events
Section titled “Events”Status bar has 1 event of its own, listed below. 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.
| Event | Handler gets | When |
|---|---|---|
on_press |
() |
Message or callable sent on press. None disables the control. |
Handler gets is what Pyzed passes to your callable: () means nothing. Any handler can also be a message (a value that is not callable), which goes to update().
Handling the events
Section titled “Handling the events”The same events written three ways. Imperative: methods of the app change self. Declarative: the handlers produce messages and one update() decides. Functional: a pure function draws an immutable state and asks for changes with set_state(...). See Imperative, declarative and functional.
class Ide(pz.App): def __init__(self): self.show_left = True
def view(self): return ui.status_bar( [ui.status_item(icon="panel-left", selected=self.show_left, tooltip="Project panel", on_press=lambda: setattr(self, "show_left", not self.show_left))], [ui.status_item("Python", icon="file-code")], )class Ide(pz.App): show_left = True
def update(self, message): if message == "toggle left": self.show_left = not self.show_left
def view(self): return ui.status_bar([ui.status_item(icon="panel-left", on_press="toggle left", selected=self.show_left)])from dataclasses import dataclass
@dataclass(frozen=True)class State: show_left: bool = True
def view(state, set_state): return ui.status_bar([ui.status_item(icon="panel-left", selected=state.show_left, on_press=lambda: set_state(show_left=not state.show_left))])Properties and API
Section titled “Properties and API”ui.status_bar
Section titled “ui.status_bar”status_bar(start=(), end=(), *, height=28, theme=None)The bottom status bar.
| Property | Default | Description |
|---|---|---|
start |
() |
Widgets at the start (left). |
end |
() |
Widgets at the end (right). |
height |
28 |
Height. |
theme |
None |
Theme to use instead of the current one (pyzed.theme.current()). |
ui.status_item
Section titled “ui.status_item”status_item( content=None, on_press=None, *, icon=None, color=None, icon_color=None, selected=False, tooltip=None, keys=None, theme=None,)An icon and/or text in the status bar (diagnostics, cursor position, language…).
| Property | Default | Description |
|---|---|---|
content |
None |
Text. |
icon |
None |
Name of a Lucide icon (pyzed icons lists them). |
color |
None |
Text or icon color. |
icon_color |
None |
Icon color: a theme token or a hex color. |
selected |
False |
Marks it as selected. |
tooltip |
None |
Tooltip text. |
keys |
None |
Shortcut shown at the end, written as a string: "ctrl-s", "cmd-k cmd-s". |
theme |
None |
Theme to use instead of the current one (pyzed.theme.current()). |
Events: on_press (events).