Empty State
Placeholder components for empty content areas with decorative elements and helpful guidance.
Preview
Standard empty state with decorative elements
No projects yet
Create your first project to start organizing your work.
Preset Variants
Built-in configurations for common scenarios
No results found
Try adjusting your search or filters to find what you're looking for.
No data available
There's no data to display at the moment.
No team members
Invite people to collaborate with you.
All caught up!
You have no new notifications.
Search Empty State
Empty state with search term displayed
No results found
Your search "design system components" did not match any items. Please try again.
Sizes
Small, medium, and large empty states
Small
No items
Add your first item.
Medium (default)
No items
Add your first item to get started.
Large
No items
Add your first item to get started with your collection.
Simple Mode
Clean empty states without decorative elements
No projects yet
Create your first project to start organizing your work.
No results found
Try adjusting your search or filters to find what you're looking for.
Custom Icons
Override icons with custom elements
No AI suggestions
Start typing to get AI-powered recommendations.
No cloud files
Upload files to access them anywhere.
No messages
Start a conversation.
With Actions
Primary and secondary action buttons
No team members
Invite colleagues to collaborate on this project.
With Inline Link
Description with inline link
Props
EmptyState component API reference
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'default' | 'search' | 'no-data' | 'no-results' | 'no-items' | 'cart' | 'no-users' | 'no-notifications' | 'no-events' | 'default' | Preset variant |
style | 'simple' | 'illustrated' | 'illustrated' | Visual style - simple has just icon, illustrated adds rings and floating icons |
size | 'sm' | 'md' | 'lg' | 'md' | Size variant |
title | string | — | Title text (overrides variant) |
description | string | — | Description text (overrides variant) |
icon | ReactNode | — | Custom icon element |
showRings | boolean | true | Show concentric ring decorations (illustrated style only) |
showFloatingIcons | boolean | true | Show floating icon decorations (illustrated style only) |
accentIcon | boolean | false | Use indigo accent for central icon |
action | { label: string, onClick: () => void, variant?: string } | — | Primary action button |
secondaryAction | { label: string, onClick: () => void } | — | Secondary action button |
searchTerm | string | — | Search term to display in description |
linkText | string | — | Inline link text |
onLinkClick | () => void | — | Link click handler |
children | ReactNode | — | Custom content below description |
className | string | — | Additional CSS classes |
Usage
Import and implementation example
import { EmptyState } from '@/components/ui/empty-state'
export default function Example() {
return (
<>
{/* Basic usage (illustrated style - default) */}
<EmptyState
title="No projects"
description="Create your first project"
action={{ label: "Create", onClick: handleCreate }}
/>
{/* Simple style (no rings/floating icons) */}
<EmptyState
style="simple"
title="No items"
description="Add your first item"
/>
{/* Using a preset variant */}
<EmptyState variant="search" />
<EmptyState variant="no-data" />
<EmptyState variant="no-users" />
{/* With search term */}
<EmptyState
variant="search"
searchTerm="design system"
action={{ label: "Clear", onClick: clearSearch }}
/>
{/* Illustrated with decorations disabled */}
<EmptyState
showRings={false}
showFloatingIcons={false}
title="Minimal illustrated"
/>
{/* With primary and secondary actions */}
<EmptyState
action={{ label: 'Primary', onClick: () => {} }}
secondaryAction={{ label: 'Secondary', onClick: () => {} }}
/>
{/* With inline link */}
<EmptyState
description="No data available"
linkText="Learn more"
onLinkClick={() => console.log('Link clicked')}
/>
</>
)
}Built With
2 componentsThis block uses the following UI components from the design system:
Features
Built-in functionality
- 2 visual styles: Simple (icon only) or illustrated (with rings and floating icons)
- 9 preset variants: Pre-configured for common empty state scenarios
- Decorative elements: Concentric rings and floating icons for visual appeal
- Action buttons: Primary and secondary action support
- Search integration: Display search terms in dynamic descriptions
- Inline links: Clickable links within description
- Custom icons: Replace central icon with any React node
- Dark mode: Full dark mode support
Accessibility
Accessibility considerations
ARIA Attributes
Uses semantic heading elementsDecorative elements are aria-hiddenAction buttons are properly labeledKeyboard Navigation
| Key | Action |
|---|---|
| Tab | Navigate to action buttons |
| Enter / Space | Activate buttons |
Notes
- Decorative icons do not interfere with screen readers
- Clear hierarchy between title and description
- Links are distinguishable from buttons