Empty state
A centered icon, title, description and actions for a place that has nothing to show yet.
ui.empty_state · Category: Feedback · Full reference →


ui.empty_state("No results", "Try a different search.", icon="search", actions=[ui.button("Clear filters", on_clear, size="sm")])When to use
Section titled “When to use”- For an empty list, a search with no results, or a panel before the first file is opened.
- Offer the next step as an action (Create, Clear filters, Open folder).
from pyzed import ui
ui.empty_state("No results", "Try a different search.", icon="search", actions=[ui.button("Clear filters", on_clear, size="sm")])Variants
Section titled “Variants”Content
Section titled “Content”

Code
ui.empty_state("No notifications")

Code
ui.empty_state("No results", "Try a different search.", icon="search")

actions=Code
ui.empty_state("No projects yet", "Create one to get started.", icon="folder-plus", actions=[ui.button("New project", on_new, variant="solid", size="sm")])States and events
Section titled “States and events”

size="sm", height="shrink"Code
ui.empty_state("No results", "Try another search", icon="search", size="sm", height="shrink")

size="lg"Code
ui.empty_state("No projects", "Create one to start", icon="folder", size="lg", height=220)Events
Section titled “Events”Empty state 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.empty_state
Section titled “ui.empty_state”empty_state( title, description=None, *, icon='inbox', actions=(), size='md', height='fill', theme=None,)A centered placeholder for empty lists, searches with no results, etc.
| Property | Default | Description |
|---|---|---|
title |
required | Title. |
description |
None |
Secondary text. |
icon |
"inbox" |
Name of a Lucide icon (pyzed icons lists them). |
actions |
() |
Extra widgets (usually buttons) shown as actions. |
size |
"md" |
"sm", "md" or "lg". |
height |
"fill" |
"fill" (default), pixels or "shrink". |
theme |
None |
Theme to use instead of the current one (pyzed.theme.current()). |
Related
Section titled “Related”CalloutAn inline notice with a title, text and actions.
Keybinding hintA muted “Open file Ctrl P” hint.
CardA bordered surface with an optional title and actions.