Empty State
Usage
Empty State is a placeholder surface for a list, page section, or feature that has no content to show yet. Use it when users need context about why the area is empty and what they can do next, such as first-time setup, filtered no-results moments, or empty collections.
import { MtEmptyState } from "@shopware-ag/meteor-component-library";
Examples
With action
Add a link and a button so users can recover from the empty state.
API reference
Props
| Prop | Type | Default |
|---|---|---|
headline * | string | |
description * | string | |
icon * | string | |
link-href | string | |
link-text | string | |
link-type | "external" | "internal" | "internal" |
button-text | string | |
centered | boolean | false |
Events
| Event | Payload |
|---|---|
button-click | any[] |
Slots
| Slot | Bindings |
|---|---|
button | {} |
Best practices
Do
- Use a headline and description that explain the empty situation clearly.
- Add one relevant next step, such as a Link or primary button, when users can recover from the empty state.
- Choose an icon that supports the message without becoming the main focus.
Don't
- Do not use Empty State for critical warnings or error-heavy states.
- Do not overload the component with multiple competing actions.
- Do not leave users without context about why the area is empty.
Behavior
- Empty State combines an icon, headline, description, and optional recovery action in one surface.
- A text link and a button can be shown when users should navigate or create something from the empty state.
- The
buttonslot can replace the default action button when a custom button is needed.
Accessibility
- Keep the headline and description clear enough to explain the empty situation without relying on the icon.
- Use action text that describes the next step clearly, especially when the state blocks progress.
- Make sure linked or button-based recovery actions are keyboard reachable and specific.