StartFoundationsComponentsContent

Empty state

An empty state fills a region that loaded with nothing to show. It says why the region is empty and offers the next step.

Stable Figma
OverviewUsageAPIAccessibility

Create your first project

A project is where your team's work lives. Set one up to get started. New project
<tk-empty-state>
  <tk-icon slot="media" name="plus"></tk-icon>
  <h3 slot="title">Create your first project</h3>
  A project is where your team's work lives. Set one up to get started.
  <tk-button slot="actions" variant="primary">New project</tk-button>
</tk-empty-state>

Anatomy

Part What it is
tk-empty-state the element; a centered column up to 30rem wide
media slot an optional icon or picture; decorative
title slot an optional title; put a real heading in it
default slot the body: a short explanation
actions slot optional actions, centered under the body

Every slot is optional, and an empty one takes no space.

Use cases

Every case uses the same element. The media, the words, and the action tell them apart.

Case Media Title Action
First run a larger tk-icon or picture "Create your first project" one primary Create or Add
Empty list a tk-icon "No saved items yet" Add, or none
No results search "No results for 'invoce'" Clear filters or Edit search
Failed load error "Something went wrong" Retry, and maybe a support link
All done none, or a glyph "You're all caught up" usually none

Something went wrong

We couldn't load your invoices. Check your connection and try again. Retry Contact support
<tk-empty-state>
  <tk-icon slot="media" name="error"></tk-icon>
  <h3 slot="title">Something went wrong</h3>
  We couldn't load your invoices. Check your connection and try again.
  <tk-button slot="actions" variant="primary">Retry</tk-button>
  <tk-link slot="actions" treatment="quiet" href="/support">Contact support</tk-link>
</tk-empty-state>
  • Keep an error empty state neutral. There is no red or green version; the words and the Retry action carry it.
  • After a search, offer a way out, such as Clear filters. Never "Add your first".

Sizes

No results for 'quarterly' Try a different search, or clear the filters. Clear filters
<tk-empty-state compact>
  <tk-icon slot="media" name="search"></tk-icon>
  <span slot="title">No results for 'quarterly'</span>
  Try a different search, or clear the filters.
  <tk-button slot="actions" size="small">Clear filters</tk-button>
</tk-empty-state>
Padding (block × inline) Media Title Body
default space-48 × space-24 3rem font-size-xl font-size-md
compact space-24 × space-16 2rem font-size-lg font-size-sm

Use the default to fill a page or a large panel, and compact inside a card, panel, or table. Put the element in a region with a height and it centers vertically.

Media

  • A tk-icon in slot="media" sizes to the media box and takes the muted icon color. A picture sizes itself.
  • Media is hidden from screen readers unless you name it with alt, aria-label, or aria-labelledby. Name it only if it adds meaning the words don't.
  • No illustrations ship with Thykes; bring your own if you need one.