Empty
Use the Empty component to display an empty state.
No Projects Yet
You haven't created any projects yet. Get started by creating your first project.
Learn More
Installation
pnpm dlx cubix@latest add empty --base ariaUsage
import {
Empty,
EmptyContent,
EmptyDescription,
EmptyHeader,
EmptyMedia,
EmptyTitle,
} from "@/components/cubix/empty"<Empty>
<EmptyHeader>
<EmptyMedia variant="icon">
<Icon />
</EmptyMedia>
<EmptyTitle>No data</EmptyTitle>
<EmptyDescription>No data found</EmptyDescription>
</EmptyHeader>
<EmptyContent>
<Button>Add data</Button>
</EmptyContent>
</Empty>Composition
Use the following composition to build an Empty state:
Empty
├── EmptyHeader
│ ├── EmptyMedia
│ ├── EmptyTitle
│ └── EmptyDescription
└── EmptyContentOutline
Use the border utility class to create an outline empty state.
Cloud Storage Empty
Upload files to your cloud storage to access them anywhere.
Background
Use the bg-* and bg-gradient-* utilities to add a background to the empty state.
No Notifications
You're all caught up. New notifications will appear here.
Avatar
Use the EmptyMedia component to display an avatar in the empty state.
LR
User Offline
This user is currently offline. You can leave a message to notify them or try again later.
Avatar Group
Use the EmptyMedia component to display an avatar group in the empty state.
VRLRER
No Team Members
Invite your team to collaborate on this project.
Input Group
You can add an InputGroup component to the EmptyContent component.
404 - Not Found
The page you're looking for doesn't exist. Try searching for what you need below.
Need help? Contact support
API Reference
Empty
The main component of the empty state. Wraps the EmptyHeader and EmptyContent components.
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | - | Additional Tailwind classes merged with the component styles (last one wins). |
EmptyHeader
Wraps the empty media, title, and description.
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | - | Additional Tailwind classes merged with the component styles (last one wins). |
EmptyMedia
Display media such as an icon, image, or avatar.
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | "default" | "icon" | "default" | Visual style for the media. Use icon for a muted rounded icon container. |
| className | string | - | Additional Tailwind classes merged with the component styles (last one wins). |
EmptyTitle
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | - | Additional Tailwind classes merged with the component styles (last one wins). |
EmptyDescription
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | - | Additional Tailwind classes merged with the component styles (last one wins). |
EmptyContent
Display actions such as a button, input, or link.
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | - | Additional Tailwind classes merged with the component styles (last one wins). |