Packages
pui
1.0.1
1.0.2
1.0.1
1.0.0
1.0.0-beta.18
retired
1.0.0-beta.17
retired
1.0.0-beta.16
retired
1.0.0-beta.15
retired
1.0.0-beta.14
retired
1.0.0-beta.13
retired
1.0.0-beta.12
retired
1.0.0-beta.11
retired
1.0.0-beta.10
retired
1.0.0-beta.9
retired
1.0.0-beta.8
retired
1.0.0-beta.7
retired
1.0.0-beta.6
retired
1.0.0-beta.5
retired
1.0.0-beta.4
retired
1.0.0-beta.3
retired
1.0.0-beta.1
retired
1.0.0-alpha.32
retired
1.0.0-alpha.31
retired
1.0.0-alpha.30
retired
1.0.0-alpha.29
retired
1.0.0-alpha.28
retired
1.0.0-alpha.27
retired
1.0.0-alpha.26
retired
1.0.0-alpha.25
retired
1.0.0-alpha.24
retired
1.0.0-alpha.23
retired
1.0.0-alpha.22
retired
1.0.0-alpha.21
retired
1.0.0-alpha.19
retired
1.0.0-alpha.18
retired
1.0.0-alpha.17
retired
1.0.0-alpha.16
retired
1.0.0-alpha.15
retired
1.0.0-alpha.14
retired
1.0.0-alpha.13
retired
1.0.0-alpha.12
retired
1.0.0-alpha.11
retired
A Phoenix LiveView UI toolkit
Current section
Files
Jump to
Current section
Files
guides/empty.md
# PUI.Empty
`PUI.Empty` is a composable empty state for collections, search results, and
first-use screens.
## Usage
```heex
<.empty>
<:icon><PUI.Icon.icon name={:search} class="size-6" /></:icon>
<:title>No projects found</:title>
<:description>Try a different search or create a new project.</:description>
<:actions>
<.button>Create project</.button>
</:actions>
</.empty>
```
The title is required. Description, icon, actions, and additional content are
optional slots owned by the application.
## Host-owned presentation
Pass a `class` when PUI should provide the semantic structure but your design
system owns the presentation:
```heex
<.empty class="gap-3">
<:title>No notifications</:title>
<:description>You are all caught up.</:description>
</.empty>
```
Application-owned icons should be passed through the icon slot. PUI does not
assume an icon library for empty-state content.