Empty state

A title, description and recovery actions for a view with nothing to show yet.

<tp-empty-state>
Empty state
Default density Compact density Restart from the initial state Show the copyable source
Create project Import from CSV

Usage

Use an Empty state where a list, table or search would otherwise render nothing. Say what is missing in title, why or what to do next in description, and offer the action that fills the view. Group several actions in one element in the actions slot. The component is presentational: it owns no value, events or form state. Empty media, descriptions and action regions collapse.

Media

Put an icon, illustration or avatar group in the media slot. media-treatment="icon" sizes a single glyph for the icon role; the default plain shows the media as authored, which suits illustrations or avatars. Mark decorative media aria-hidden. Decorate repeated illustrations with aria-hidden; give meaningful images alt text.

Media treatments
Default density Compact density Restart from the initial state Show the copyable source
Invite teammates

Search recovery

Default content sits between the description and the actions. Use it for recovery that is more than a button, such as a new search, so people stay on the page instead of starting over.

No results
Default density Compact density Restart from the initial state Show the copyable source
Clear filters Search all workspaces

Inside a surface

Empty states inherit their container’s background, so they sit naturally inside a Card or a table body. Omit actions when the state is terminal and nothing can change it.

In a card
Default density Compact density Restart from the initial state Show the copyable source

Archived invoices

Surface styles

The component paints no surface of its own. Style its empty-state part for a border, a dashed drop-zone outline or a muted fill. Use the description slot when the description needs a link.

Bordered and filled
Default density Compact density Restart from the initial state Show the copyable source
Drop contracts here or browse your computer. Save current search

API Reference

Every element also accepts motion-policy.

Attributes

AttributePropertyTypeDefaultDescriptiontitletitlestring'Nothing here'What is missing, as a heading, when the title slot is empty.descriptiondescriptionstring''Why the view is empty or what to do next, when the description slot is empty.media-treatmentmediaTreatment'plain' | 'icon''plain'icon sizes a single Icon in the media slot to the icon role; plain shows illustrations and avatars as authored.

Slots

SlotDescriptionmediaAn Icon, an illustration or an Avatar group above the title.iconThe former name of media, used when media is empty.titleA title with markup; it replaces title.descriptionA description with markup, such as a link; it replaces description.defaultRecovery that is more than a button, such as a search field, between the text and the actions.contentContent placed with the default slot.actionsThe Buttons that fill the view; group several in one element.

CSS parts

PartDescription::part(empty-state)The section around everything, centered; it has no surface until you style it.::part(empty-state-content)The region holding the default, content and actions slots.::part(empty-state-description)The description under the heading, in muted text.::part(empty-state-header)The header holding the media, the title and the description.::part(empty-state-media)The wrapper of the media slot, sized by the media treatment.::part(empty-state-title)The heading.

Components, widgets and patterns that use this one.