Display friendly messages when content is unavailable or empty
Icon, title, and description
{ icon: "Inbox", title: "No messages", description: "Your inbox is empty" }Your inbox is empty. New messages will appear here.
Includes a call-to-action button
{ icon: "FileText", title: "No documents", description: "Get started by creating...", action: "<DesignButton>" }Get started by creating your first document
Suitable for full-page empty states
{ size: "large", icon: "Search", title: "No results found" }Try adjusting your search or filter to find what you're looking for
Add items to get started
Invite people to collaborate
Your calendar is clear
Save items for later
Empty state without icon
{ title: "No items", description: "Description text" }You're all caught up! Check back later for updates.
size="large" for full-page empty statesImport and Usage:
import { DesignEmptyState } from "@/components/ui/design-empty-state"
import { DesignButton } from "@/components/ui/design-button"
import { Inbox, Plus } from "lucide-react"
// Basic usage
<DesignEmptyState
icon={Inbox}
title="No messages"
description="Your inbox is empty"
/>
// With action button
<DesignEmptyState
icon={Inbox}
title="No messages"
description="Start a conversation"
action={
<DesignButton variant="primary">
<Plus />
New Message
</DesignButton>
}
/>
// Large size for full-page
<DesignEmptyState
size="large"
icon={Inbox}
title="No messages"
description="Your inbox is empty"
/>| Prop | Type | Default | Description |
|---|---|---|---|
icon | LucideIcon | - | Icon component from lucide-react |
title | string | required | Main heading text |
description | string | - | Optional description text |
action | ReactNode | - | Optional action button or element |
size | "default" | "large" | "default" | Size variant of the empty state |
className | string | - | Additional CSS classes |