Empty state
Explain an empty collection and offer a relevant next step.
Preview
No projects yet
Create your first project to organise work and invite teammates.
Example
<.empty_state title="No projects" description="Create a project to begin."><:actions><.button color={:primary}>Create project</.button></:actions></.empty_state>
API contract
empty_state/1 uses declared Phoenix attributes and slots. This table is generated from the compiled component metadata.
| Attribute | Type | Required | Default | Accepted values |
|---|---|---|---|---|
title |
:string |
Yes | — |
Any value matching the declared type |
description |
:string |
No | nil |
Any value matching the declared type |
class |
:any |
No | nil |
Any value matching the declared type |
rest |
:global |
No | — |
Any value matching the declared type |
| Slot | Required | Slot attributes |
|---|---|---|
icon |
No | No slot attributes |
actions |
No | No slot attributes |
States and behavior
Semantic text accompanies visual treatment so status is not conveyed through color or motion alone.
Keyboard and accessibility
The component itself does not add a keyboard interaction. Any slotted action must remain a labelled native control.