Skip to main content

Empty state

  • No results: Display a helpful message when search queries or filters return no matching items.
  • Empty lists: Guide users to add items when product lists, customer lists, or order histories are empty.
  • First-time setup: Provide onboarding guidance when a feature is used for the first time.
  • No data available: Indicate when data is unavailable and suggest actions to populate the view.

Configure the following properties on the empty state component.

Anchor to heading
heading
string

The heading of the empty state.

Anchor to subheading
subheading
string

The subheading of the empty state.

The empty state component supports slots for adding graphics and actions. Learn more about using slots.

Anchor to graphic
graphic
HTMLElement

The graphic to display in the empty state. The only supported components is Icon, with a type of alert-circle, search, info, or circle-info.

Anchor to primary-action
primary-action
HTMLElement

The primary action to perform, provided as a button or link type element.

Anchor to secondary-actions
secondary-actions
HTMLElement

The secondary actions to perform, provided as button or link type elements.


Anchor to Create a generic empty stateCreate a generic empty state

Create layouts using an empty state component. This example demonstrates a basic empty state container.

Create a generic empty state

Create layouts using an empty state component. This example demonstrates a basic empty state container.

Create a generic empty state

<s-empty-state heading="Empty state title" subheading="Supporting copy">
<s-icon slot="graphic" type="info" />
<s-button slot="primary-action">Primary action</s-button>
</s-empty-state>

Was this page helpful?