Surfaces and display
Empty state
What a list, a table or a page shows when there is nothing in it yet: what will be here, why it is empty, and what to do. .kui-empty with a mark, a title, a sentence and actions.
Examples
Nothing yet, with the first step
No cases yet
Cases you open appear here, with their next hearing and deadline.
HTML
<div class="kui-empty kui-empty--bordered">
<span class="kui-empty__mark"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#inbox"></use></svg></span>
<h4 class="kui-empty__title">No cases yet</h4>
<p class="kui-empty__text">Cases you open appear here, with their next hearing and deadline.</p>
<div class="kui-empty__actions">
<button class="kui-button kui-button--primary" type="button"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#plus"></use></svg><span>New case</span></button>
<button class="kui-button" type="button"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#upload"></use></svg><span>Import from Excel</span></button>
</div>
</div>
No results
After a search or a filter: say what was searched and how to widen it.
Nothing matches “Šumadija Promet 2024”
Check the spelling, or search all years.
HTML
<div class="kui-empty">
<span class="kui-empty__mark"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#search"></use></svg></span>
<h4 class="kui-empty__title">Nothing matches “Šumadija Promet 2024”</h4>
<p class="kui-empty__text">Check the spelling, or search all years.</p>
<div class="kui-empty__actions"><button class="kui-button" type="button">Search all years</button></div>
</div>
States
Every state
All done: a positive empty state, with no action needed. Error: a state that says what failed and offers to try again. Without permission: says who can give it. Each one keeps the same layout so the page does not jump.
Sve je urađeno
No deadlines this week.
Could not load the invoices
The connection was lost. What you entered is kept.
Zugriffsberechtigungsanfrage erforderlich
Ask Milica Šarić, the owner of this workspace, for access.
HTML
<div class="kui-grid">
<div class="kui-empty kui-empty--bordered"><span class="kui-empty__mark"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#circle-check"></use></svg></span><h4 class="kui-empty__title">Sve je urađeno</h4><p class="kui-empty__text">No deadlines this week.</p></div>
<div class="kui-empty kui-empty--bordered"><span class="kui-empty__mark"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#cloud-off"></use></svg></span><h4 class="kui-empty__title">Could not load the invoices</h4><p class="kui-empty__text">The connection was lost. What you entered is kept.</p><div class="kui-empty__actions"><button class="kui-button" type="button"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#refresh-cw"></use></svg><span>Try again</span></button></div></div>
<div class="kui-empty kui-empty--bordered"><span class="kui-empty__mark"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#lock"></use></svg></span><h4 class="kui-empty__title">Zugriffsberechtigungsanfrage erforderlich</h4><p class="kui-empty__text">Ask Milica Šarić, the owner of this workspace, for access.</p></div>
</div>
Classes and attributes
.kui-empty- The empty state, centred.
--bordered- A dashed frame, where the content would be.
.kui-empty__mark- A round mark with an icon (aria-hidden).
.kui-empty__title, .kui-empty__text- What is missing, and why or what will be here.
.kui-empty__actions- One main action, and at most one more.
Accessibility
- The title is a heading at the right level, so the empty part of the page is found by its heading.
- When a search leaves no results, announce the count (“No results”) with a live region.
- The mark is decoration; the words say everything.
Do and do not
Do
- Say what will appear here.
- Offer the first step as a button.
- Use a different empty state for “nothing yet”, “no results” and “could not load”.
Do not
- Do not leave a blank area or an empty table head.
- Do not blame the person.
- Do not use a large illustration that pushes the action off a phone screen.