Empty state
What to show when a list has nothing in it yet.
Updated
Default
No messages yet
Messages from your visitors will show up here.
<div class="mx-auto max-w-md">
{ui card}
{ui empty,
icon: 'inbox',
title: 'No messages yet',
description: 'Messages from your visitors will show up here.',
}
{ui button, title: 'Share your form', class: 'button-outline' /}
{/ui}
{/ui}
</div>
A card holding an empty element: an icon, a line saying what is missing, a line saying what fills it, and one button for the next step. Use button-outline on the button when the page already has a primary action elsewhere.
In a table
| Name | Role |
|---|---|
No members match that search |
|
{ui table,
columns: ['Name', 'Role'],
rows: [],
}
{block empty}
{ui empty, title: 'No members match that search'}
{ui button, title: 'Clear search', class: 'button-outline' /}
{/ui}
{/block}
{/ui}
A table shows {block empty} across every column when it has no rows, so a search that matches nothing keeps its header and offers a way out. A plain string is enough when there is nothing to offer.