Skip to content

Panel header

The header of a dock or panel: an optional icon, the title and action buttons on the right.

ui.panel_header · Category: Workspace · Full reference →

Panel headerPanel header
  • At the top of every dock (Project, Outline, Terminal) to name it and hold its actions.
import pyzed as pz
from pyzed import ui
pz.column([
ui.panel_header("Project", [ui.icon_button("plus", on_new, size="xs"),
ui.icon_button("ellipsis", on_menu, size="xs")]),
ui.panel_header("Terminal", [ui.icon_button("x", on_close, size="xs")], icon="terminal"),
], spacing=12, width=320)
Panel header: TitlePanel header: Title
Title
Code
pz.container(ui.panel_header("Project"), width=280)
Panel header: icon=Panel header: icon=
icon=
Code
pz.container(ui.panel_header("Terminal", icon="terminal"), width=280)
Panel header: actions=Panel header: actions=
actions=
Code
pz.container(ui.panel_header("Project", [ui.icon_button("plus", on_new, size="xs"),
ui.icon_button("ellipsis", on_menu, size="xs")]), width=280)
Panel header: height=40Panel header: height=40
height=40
Code
pz.container(ui.panel_header("Outline", height=40), width=280)

Panel header 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.

panel_header(title, actions=(), *, icon=None, height=32, theme=None)

A panel header: icon, title and actions.

Property Default Description
title required Title.
actions () Extra widgets (usually buttons) shown as actions.
icon None Name of a Lucide icon (pyzed icons lists them).
height 32 Height.
theme None Theme to use instead of the current one (pyzed.theme.current()).

Full reference →