EmptyState

Zero-data placeholder with icon, title, description, and an optional action button. Includes 4 semantic variants.

Live Demo

No content yet

Get started by creating your first item.

No results found

Try adjusting your search terms.

Something went wrong

We couldn't load this content. Please try again.

No items match

Remove some filters to see more results.

Props

PropTypeDefaultDescription
titlestringMain heading (required).
descriptionstringSupporting text below the title.
variant'default' | 'search' | 'error' | 'no-results''default'Selects the built-in icon and implied context.
iconReact.ReactNodeCustom icon that overrides the built-in variant icon.
action{ label: string; onClick: () => void }Primary action button rendered below the description.
classNamestringExtra CSS class on the root element.

Usage

import { EmptyState } from '@ghiberti85/ui'

// Default
<EmptyState
  title="No content yet"
  description="Get started by creating your first item."
  action={{ label: 'Create item', onClick: () => {} }}
/>

// Search empty state
<EmptyState
  variant="search"
  title="No results found"
  description="Try adjusting your search terms."
  action={{ label: 'Clear search', onClick: () => setQuery('') }}
/>

// Error state
<EmptyState
  variant="error"
  title="Something went wrong"
  description="We couldn't load this content."
  action={{ label: 'Retry', onClick: () => refetch() }}
/>

// Custom icon
<EmptyState
  icon={<MyIcon />}
  title="Inbox empty"
  description="You're all caught up!"
/>

View in Storybook

Open in Storybook
Ghiberti UI — Design System