Empty
A placeholder for missing content: icon, title, description and actions, centered in the rest of the container.
ui.emptyBasic
ui.empty("No files yet") .icon(IconName::Folder) .description("Drop files on the window.");Title only
ui.empty("No results");With an action
ui.empty("No projects") .description("Create one to get started.") .children(|ui| { ui.button("New project").primary(); });API reference
| Setting | Description |
|---|---|
.icon(icon: IconName) | A large muted icon above the title. |
.description(text: impl Display) | Small centered, wrapping text below the title. |
.children(f: impl FnOnce(&mut Ui<'a>) | Declares the empty state, with the actions declared by f below the description. |