Empty states
Components: EmptyState, EmptyStateIllustration, EmptyStateMessage, EmptyStateTitle, EmptyStateDescription, EmptyStateActions, EmptyStateLink, TableEmptyState
An empty state is EmptyState placed where the content would be. The header around it stays.
When to use
type sets the scale, not the cause. If the empty area fills a page, table or panel, use collection-empty (the default). If it sits in a small container, use no-results.
Rules
Composition
- Compose the parts:
EmptyState›EmptyStateIllustration(collection-emptyonly) ›EmptyStateMessage›EmptyStateTitle+EmptyStateDescription›EmptyStateActions›EmptyStateLink(optional). collection-emptyneeds a title and a description.no-resultsneeds one of them: a title in a column or card, a description in a chart.- Never pass
typeto a part. Parts take the scale fromEmptyState. - There is no
size,variant,icon,titleoractionprop, and noclassNameonTableEmptyState. - Never place a bare icon. Put one icon from
@wallarm-org/design-system/iconsinEmptyStateIllustrationand leave its size alone. EmptyStateis already a live region (role='status'). Never wrap it in another.
Layout and spacing
EmptyStateowns its spacing:collection-emptyis 256–560px wide with 24px vertical padding and 16px gaps;no-resultsis 240px wide with 8px padding. Never addpy-*,gap-*orw-*to it or its parts.- In a page table, wrap it in
TableEmptyState: it adds 128px vertical padding and renders only when there are no rows andisLoadingis false, so it needs no guard. - In a drawer or section table, render
EmptyStatedirectly inTable, guarded bydata.length === 0 && !isLoading. - Never wrap
EmptyStatein aCardor a bordered box. - Keep
PageHeader,PageToolbar, section headers and table column headers visible when empty.
Copy and actions
- Write the title as a short statement: "No rules yet". Never an accusation: "You have no rules".
- Keep the description to one or two sentences: what the user gets, or what unlocks the area.
- Show one create action per screen. If
PageActionsor a section header has the create button, the empty state has no button. - If no header has a create button, put
Button size='medium'inEmptyStateActions. - If search or filters matched nothing, offer "Reset filters" as
Button variant='outline' color='neutral'. Never a create action. - If a list failed to load, say what failed ("Couldn't load triggers") and offer "Try again" as
Button variant='outline' color='neutral'. If access is denied, name the permission and add no button. - If a dependency is missing, name the choice that unlocks the area. Never say "No {items} yet".
- If one area can be dependency-empty or nothing-yet, switch the copy.
- If each tab can be empty, write copy per tab. Never reuse one sentence across tabs.
- Pick an icon that names the entity:
Usersfor users,Shapesfor rules,CheckCheckfor caught up,Historyfor read. - Never use an
Alertor a toast to say a list is empty.
Examples
A page table with nothing yet: PageActions has the create button, so the empty state has none.
The header, toolbar and column headers stay visible. Typing a search switches the copy to "No results found" with "Reset filters": the app passes its own flag for the cause.
Search or filters matched nothing: reset, never create.
The table has rows: "Reset filters" clears the search and they come back.
A drawer or section table: EmptyState is a direct Table child, hidden while loading.
No TableEmptyState here: its 128px vertical padding is too tall for a section.
A missing dependency: name the choice that unlocks the area, with no action.
The section header stays visible. Never "No operations yet".
Empty tabs: each tab gets its own copy and an icon that names the case.
A notification panel: no action, and every tab stays visible.
Small containers: a kanban column gets a title only, a chart card a description only.
type='no-results' has no illustration. Centre it in the column or the card body.
States
What your app owns
- The cause. The DS cannot tell nothing-yet, filtered and dependency-missing apart. Pass your own flag.
- Copy.
EmptyStatehas no default strings. - Dependency gating. Show the dependency state until the earlier field has a value. See Create and edit forms.
- Errors. There is no error
type: pass the failure and the retry yourself. A failed page, not a list, is your own message inPageContent. - Notification center. No popover block exists. Compose
Popover,TabsandEmptyState. - Kanban. No kanban component exists. Centre
EmptyState type='no-results'in your column. - Figma drift. Figma flags the empty state component for an update. Follow the code scale until it changes.