PUI.Empty (pui v1.0.0)

Copy Markdown

A composable empty state for collections and pages without content.

Empty states keep the explanation and next action in host-owned slots while PUI supplies the accessible structure and default presentation.

Example

<.empty>
  <:icon><PUI.Icon.icon name={:search} class="size-6" /></:icon>
  <:title>No projects yet</:title>
  <:description>Create a project to start organizing your work.</:description>
  <:actions>
    <.button>Create project</.button>
  </:actions>
</.empty>

Attributes

NameTypeDefaultDescription
classstring""Additional CSS classes
restglobalGlobal HTML attributes

Slots

SlotRequiredDescription
iconnoApplication-owned or semantic icon
titleyesEmpty-state heading
descriptionnoSupporting explanation
actionsnoRecovery or creation actions
inner_blocknoAdditional content below the actions

Summary

Functions

empty(assigns)

Attributes

  • class (:string) - Defaults to "".
  • Global attributes are accepted.

Slots

  • icon
  • title (required)
  • description
  • actions
  • inner_block