Empty States
What a view shows when there is nothing to show: first use, no results and errors, in compact, page and illustrated sizes.
Basic and with actions
An icon in a circle, a title that says what is empty, and one sentence about what to do. The icon is decorative (aria-hidden). Add the main action first and a secondary one after it; the title is a heading so the empty area can be found by heading navigation, and its level follows the section it sits in.
No notifications
When something needs your attention, it will show up here.
<div
id="empty-state-1504"
class="flex flex-col items-center px-6 text-center py-10 rounded-xl border border-dashed border-dominant-300 dark:border-dominant-600 bg-white dark:bg-dominant-950"
>
<div class="empty:hidden"></div>
<span
aria-hidden="true"
class="flex items-center justify-center rounded-full size-12 bg-dominant-100 dark:bg-dominant-800 text-dominant-700 dark:text-dominant-200"
>
<i class="fa-solid fa-inbox text-xl"> </i>
</span>
<h3 class="mt-4 text-base font-semibold text-dominant-900 dark:text-white">No notifications</h3>
<p class="mt-1 max-w-sm text-sm text-dominant-700 dark:text-dominant-200">
When something needs your attention, it will show up here.
</p>
<div class="flex flex-wrap justify-center gap-3 mt-5 empty:hidden"></div>
</div>
<div
id="empty-state-1658"
class="flex flex-col items-center px-6 text-center py-10 rounded-xl border border-dashed border-dominant-300 dark:border-dominant-600 bg-white dark:bg-dominant-950"
>
<div class="empty:hidden"></div>
<span
aria-hidden="true"
class="flex items-center justify-center rounded-full size-12 bg-primary-100 dark:bg-primary-800 text-primary-700 dark:text-primary-200"
>
<i class="fa-solid fa-box-open text-xl"> </i>
</span>
<h3 class="mt-4 text-base font-semibold text-dominant-900 dark:text-white">No products yet</h3>
<p class="mt-1 max-w-sm text-sm text-dominant-700 dark:text-dominant-200">
Add your first product to start selling.
</p>
<div class="flex flex-wrap justify-center gap-3 mt-5 empty:hidden">
<a
id="button-1750"
href="#"
class="cursor-pointer transition-colors inline-flex items-center justify-center rounded-lg font-semibold group peer focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:focus-visible:ring-offset-dominant-950 bg-primary-600 text-white shadow-sm not-disabled:hover:bg-primary-700 not-disabled:active:bg-primary-800 focus-visible:ring-primary-700 dark:focus-visible:ring-primary-400 gap-2 px-4 py-2.5 text-sm"
>
<i aria-hidden="true" class="fa-solid fa-plus"></i><span>Create product</span>
</a>
<a
id="button-1795"
href="#"
class="cursor-pointer transition-colors inline-flex items-center justify-center rounded-lg font-semibold group peer focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:focus-visible:ring-offset-dominant-950 inset-ring inset-ring-dominant-300 dark:inset-ring-dominant-600 bg-white dark:bg-dominant-800 text-dominant-700 dark:text-dominant-200 dark:shadow-none shadow-sm not-disabled:hover:bg-dominant-100 dark:not-disabled:hover:bg-dominant-700 not-disabled:hover:text-dominant-900 dark:not-disabled:hover:text-white not-disabled:active:bg-dominant-200 dark:not-disabled:active:bg-dominant-600 focus-visible:ring-primary-700 dark:focus-visible:ring-primary-400 gap-2 px-4 py-2.5 text-sm"
>
<span>Import CSV</span>
</a>
</div>
</div>
Contexts
The same part says different things. First use: invite the person to create something. No results: name the search and offer a way out; it is a role="status" because it appears after the person acts. Error: use variant="danger" and role="alert" so it is announced at once, and offer a retry. Do not reuse one wording for all three.
We could not load products
The server did not answer. Check your connection and try again.
<div
id="empty-state-1505"
class="flex flex-col items-center px-6 text-center py-10 rounded-xl border border-dashed border-dominant-300 dark:border-dominant-600 bg-white dark:bg-dominant-950"
>
<div class="empty:hidden"></div>
<span
aria-hidden="true"
class="flex items-center justify-center rounded-full size-12 bg-dominant-100 dark:bg-dominant-800 text-dominant-700 dark:text-dominant-200"
>
<i class="fa-solid fa-table-list text-xl"> </i>
</span>
<h3 class="mt-4 text-base font-semibold text-dominant-900 dark:text-white">No orders yet</h3>
<p class="mt-1 max-w-sm text-sm text-dominant-700 dark:text-dominant-200">
Orders appear here as soon as a customer checks out.
</p>
<div class="flex flex-wrap justify-center gap-3 mt-5 empty:hidden">
<a
id="button-1651"
href="#"
class="cursor-pointer transition-colors inline-flex items-center justify-center rounded-lg font-semibold group peer focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:focus-visible:ring-offset-dominant-950 bg-primary-600 text-white shadow-sm not-disabled:hover:bg-primary-700 not-disabled:active:bg-primary-800 focus-visible:ring-primary-700 dark:focus-visible:ring-primary-400 gap-2 px-4 py-2.5 text-sm"
>
<i aria-hidden="true" class="fa-solid fa-plus"></i><span>Create order</span>
</a>
</div>
</div>
<div
id="empty-state-1724"
class="flex flex-col items-center px-6 text-center py-10 rounded-xl border border-dashed border-dominant-300 dark:border-dominant-600 bg-white dark:bg-dominant-950"
role="status"
>
<div class="empty:hidden"></div>
<span
aria-hidden="true"
class="flex items-center justify-center rounded-full size-12 bg-dominant-100 dark:bg-dominant-800 text-dominant-700 dark:text-dominant-200"
>
<i class="fa-solid fa-magnifying-glass text-xl"> </i>
</span>
<h3 class="mt-4 text-base font-semibold text-dominant-900 dark:text-white">
No results for “ssd drive”
</h3>
<p class="mt-1 max-w-sm text-sm text-dominant-700 dark:text-dominant-200">
Check the spelling or try a broader search.
</p>
<div class="flex flex-wrap justify-center gap-3 mt-5 empty:hidden">
<a
id="button-1803"
href="#"
class="cursor-pointer transition-colors inline-flex items-center justify-center rounded-lg font-semibold group peer focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:focus-visible:ring-offset-dominant-950 inset-ring inset-ring-dominant-300 dark:inset-ring-dominant-600 bg-white dark:bg-dominant-800 text-dominant-700 dark:text-dominant-200 dark:shadow-none shadow-sm not-disabled:hover:bg-dominant-100 dark:not-disabled:hover:bg-dominant-700 not-disabled:hover:text-dominant-900 dark:not-disabled:hover:text-white not-disabled:active:bg-dominant-200 dark:not-disabled:active:bg-dominant-600 focus-visible:ring-primary-700 dark:focus-visible:ring-primary-400 gap-2 px-4 py-2.5 text-sm"
>
<span>Clear search</span>
</a>
</div>
</div>
<div
id="empty-state-1837"
class="flex flex-col items-center px-6 text-center py-10 rounded-xl border border-dashed border-dominant-300 dark:border-dominant-600 bg-white dark:bg-dominant-950"
role="alert"
>
<div class="empty:hidden"></div>
<span
aria-hidden="true"
class="flex items-center justify-center rounded-full size-12 bg-danger-100 dark:bg-danger-900/50 text-danger-800 dark:text-danger-300"
>
<i class="fa-solid fa-triangle-exclamation text-xl"> </i>
</span>
<h3 class="mt-4 text-base font-semibold text-dominant-900 dark:text-white">
We could not load products
</h3>
<p class="mt-1 max-w-sm text-sm text-dominant-700 dark:text-dominant-200">
The server did not answer. Check your connection and try again.
</p>
<div class="flex flex-wrap justify-center gap-3 mt-5 empty:hidden">
<button
id="button-1867"
type="button"
class="cursor-pointer transition-colors inline-flex items-center justify-center rounded-lg font-semibold group peer focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:focus-visible:ring-offset-dominant-950 inset-ring inset-ring-dominant-300 dark:inset-ring-dominant-600 bg-white dark:bg-dominant-800 text-dominant-700 dark:text-dominant-200 dark:shadow-none shadow-sm not-disabled:hover:bg-dominant-100 dark:not-disabled:hover:bg-dominant-700 not-disabled:hover:text-dominant-900 dark:not-disabled:hover:text-white not-disabled:active:bg-dominant-200 dark:not-disabled:active:bg-dominant-600 focus-visible:ring-primary-700 dark:focus-visible:ring-primary-400 gap-2 px-4 py-2.5 text-sm"
>
<i aria-hidden="true" class="fa-solid fa-rotate-right"></i><span>Try again</span>
</button>
</div>
</div>
Sizes
size="small" lives inside a card or a side panel: smaller icon, less padding, a text-sized title and usually no action. size="page" fills a whole view when the view has nothing else: a large icon, an h2 title and large buttons. Start from the page size and shrink it only when the space is shared.
Recent activity
Nothing yet
Your activity will appear here.
Create your first project
Projects keep your files, tasks and people in one place. It takes a minute to set one up.
<div
class="p-4 bg-white dark:bg-dominant-800 rounded-xl border border-dominant-200 dark:border-dominant-800"
>
<h3 class="text-sm font-semibold text-dominant-900 dark:text-white">Recent activity</h3>
<div id="empty-state-1549" class="flex flex-col items-center px-6 text-center py-6">
<div class="empty:hidden"></div>
<span
aria-hidden="true"
class="flex items-center justify-center rounded-full size-9 bg-dominant-100 dark:bg-dominant-800 text-dominant-700 dark:text-dominant-200"
>
<i class="fa-solid fa-clock-rotate-left text-xl"> </i>
</span>
<h3 class="mt-4 text-sm font-semibold text-dominant-900 dark:text-white">Nothing yet</h3>
<p class="mt-1 max-w-sm text-sm text-dominant-700 dark:text-dominant-200">
Your activity will appear here.
</p>
<div class="flex flex-wrap justify-center gap-3 mt-5 empty:hidden"></div>
</div>
</div>
<div
id="empty-state-1670"
class="flex flex-col items-center px-6 text-center py-20 rounded-xl border border-dashed border-dominant-300 dark:border-dominant-600 bg-white dark:bg-dominant-950"
>
<div class="empty:hidden"></div>
<span
aria-hidden="true"
class="flex items-center justify-center rounded-full size-16 bg-primary-100 dark:bg-primary-800 text-primary-700 dark:text-primary-200"
>
<i class="fa-solid fa-folder-open text-xl"> </i>
</span>
<h2 class="mt-4 text-xl font-semibold text-dominant-900 dark:text-white">
Create your first project
</h2>
<p class="mt-1 max-w-sm text-sm text-dominant-700 dark:text-dominant-200">
Projects keep your files, tasks and people in one place. It takes a minute to set one up.
</p>
<div class="flex flex-wrap justify-center gap-3 mt-5 empty:hidden">
<a
id="button-1760"
href="#"
class="cursor-pointer transition-colors inline-flex items-center justify-center rounded-lg font-semibold group peer focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:focus-visible:ring-offset-dominant-950 bg-primary-600 text-white shadow-sm not-disabled:hover:bg-primary-700 not-disabled:active:bg-primary-800 focus-visible:ring-primary-700 dark:focus-visible:ring-primary-400 gap-2 px-5 py-3 text-base"
>
<i aria-hidden="true" class="fa-solid fa-plus"></i><span>Create project</span>
</a>
<a
id="button-1804"
href="#"
class="cursor-pointer transition-colors inline-flex items-center justify-center rounded-lg font-semibold group peer focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:focus-visible:ring-offset-dominant-950 inset-ring inset-ring-dominant-300 dark:inset-ring-dominant-600 bg-white dark:bg-dominant-800 text-dominant-700 dark:text-dominant-200 dark:shadow-none shadow-sm not-disabled:hover:bg-dominant-100 dark:not-disabled:hover:bg-dominant-700 not-disabled:hover:text-dominant-900 dark:not-disabled:hover:text-white not-disabled:active:bg-dominant-200 dark:not-disabled:active:bg-dominant-600 focus-visible:ring-primary-700 dark:focus-visible:ring-primary-400 gap-2 px-5 py-3 text-base"
>
<span>Learn more</span>
</a>
</div>
</div>
With illustration
Swap the icon for a simple inline SVG when the view deserves more presence. Draw it with theme colours through classes (fill-primary-100 stroke-primary-600 and the dark pairs) so it follows dark mode, and mark it aria-hidden="true": the title carries the meaning.
<div
id="empty-state-1506"
class="flex flex-col items-center px-6 text-center py-12 rounded-xl border border-dashed border-dominant-300 dark:border-dominant-600 bg-white dark:bg-dominant-950"
>
<div class="empty:hidden">
<svg viewBox="0 0 160 120" aria-hidden="true" fill="none" class="h-28 w-auto">
<ellipse
cx="80"
cy="104"
rx="52"
ry="8"
class="fill-dominant-200 dark:fill-dominant-800"
></ellipse>
<path
d="M36 52l22-24h44l22 24v44a6 6 0 0 1-6 6H42a6 6 0 0 1-6-6V52z"
stroke-width="3"
stroke-linejoin="round"
class="fill-primary-100 dark:fill-primary-900/50 stroke-primary-600 dark:stroke-primary-400"
></path>
<path
d="M36 52h30a14 14 0 0 0 28 0h30"
stroke-width="3"
stroke-linejoin="round"
class="stroke-primary-600 dark:stroke-primary-400"
></path>
<path
d="M80 12v10M64 18l4 8M96 18l-4 8"
stroke-width="3"
stroke-linecap="round"
class="stroke-warning-600 dark:stroke-warning-400"
></path>
</svg>
</div>
<h2 class="mt-2 text-lg font-semibold text-dominant-900 dark:text-white">No messages</h2>
<p class="mt-1 max-w-sm text-sm text-dominant-700 dark:text-dominant-200">
Start a conversation and it will show up here.
</p>
<div class="flex flex-wrap justify-center gap-3 mt-5 empty:hidden">
<a
id="button-1666"
href="#"
class="cursor-pointer transition-colors inline-flex items-center justify-center rounded-lg font-semibold group peer focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:focus-visible:ring-offset-dominant-950 bg-primary-600 text-white shadow-sm not-disabled:hover:bg-primary-700 not-disabled:active:bg-primary-800 focus-visible:ring-primary-700 dark:focus-visible:ring-primary-400 gap-2 px-4 py-2.5 text-sm"
>
<i aria-hidden="true" class="fa-solid fa-plus"></i><span>New message</span>
</a>
</div>
</div>
Options reference
Empty State is plain HTML with Tailwind classes and no script.
| Part | Value | Description |
|---|---|---|
| Container |
flex flex-col items-center px-6 py-10 text-center
|
Wrap in a dashed box (border-dashed) when it replaces a list or a table inside a page.
|
| Icon |
size-12 circle, text-xl icon
|
Always aria-hidden="true". Sizes: size-9 compact, size-12 default, size-16 page.
|
| Title |
h2 or h3
|
The heading level follows the section. Say what is empty, not “Oops”. |
| Text |
max-w-sm text-sm
|
One sentence about the next step. |
| Actions | buttons or links | The main action first. Omit them when the person cannot act. |
role
|
status or alert
|
Only when it appears after an action: status for no results, alert for an error. A first-use empty state needs no role.
|
| Tone |
dominant, primary, danger
|
The colour of the icon circle. Use danger only for errors.
|