EmptyState
Display a placeholder for no data, empty results and first-run states
Source
LLM docs
Docs
Package
Usage
EmptyState displays a placeholder for "no data" situations: empty search results, empty
tables and lists, first-run states or error illustrations with an optional call to action.
The simplest way to use it is with icon, title and description props:
We couldn't find anything matching your search. Try adjusting your filters or searching with different keywords to see more results.
Compound components
For full control over the content, use compound components instead of or together with the shorthand props:
We couldn't find anything matching your search. Try adjusting your filters or searching with different keywords to see more results.
When both are used, the content from icon, title and description props
is rendered first, followed by children:
Variant
Set the variant prop to filled or light to display the icon inside a colored circular
indicator. Use the color prop to change the indicator color. If variant is not set, the icon
is displayed with a dimmed color:
We couldn't find anything matching your search. Try adjusting your filters or searching with different keywords to see more results.
Indicator background
Set withIndicatorBackground prop to display a neutral circular background behind the indicator
without setting a variant:
Your shopping cart is empty right now. Browse our catalog and add the items you like to get started with your first order.
Title heading level
By default, EmptyState.Title renders a div element. Set the order prop to render
it as an h1–h6 heading:
Styles API
EmptyState supports the Styles API; you can add styles to any inner element of the component with the classNames prop. Follow the Styles API documentation to learn more.
We couldn't find anything matching your search. Try adjusting your filters or searching with different keywords to see more results.
Component Styles API
Hover over selectors to highlight corresponding elements
Accessibility
- The root element does not have a landmark role
EmptyState.Titleis not a heading by default, set theorderprop to change that- Make sure that action buttons have accessible labels