React Empty State

What users see when there's nothing to show — and the moment most tools get sloppy. Three variants on one quiet dashed container: empty (first-run, with the primary CTA), search (no results, with a way out of the filters), and error (destructive accents, role="alert", and a retry). Descriptions explain why it's empty and what to do next, never just "No data."

No test runs yet

Runs appear here after your first regression completes on the grid.

No parts match your filters

Nothing in the catalog matches "0.5 mm pitch" and "automotive grade". Try widening the temperature range.

No alarms

All subsystems nominal for the selected window.

Installation

npx shadcn@latest add empty-state.json

Usage

Loading...

Props

PropTypeDefaultDescription
variant'empty' \'search' \'error'
titlestringHeadline
descriptionstringWhy it's empty + what to do next
iconReact.ReactNodeOverride the variant icon
actionReact.ReactNodePrimary action
secondaryActionReact.ReactNodeQuieter second action
size'sm' \'md''md'