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

Usage

Import
import {
  Empty,
  EmptyContent,
  EmptyDescription,
  EmptyHeader,
  EmptyMedia,
  EmptyTitle,
} from "@/components/cubix/empty"
Example
<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
└── EmptyContent

Outline

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.

PropTypeDefaultDescription
classNamestring-Additional Tailwind classes merged with the component styles (last one wins).

EmptyHeader

Wraps the empty media, title, and description.

PropTypeDefaultDescription
classNamestring-Additional Tailwind classes merged with the component styles (last one wins).

EmptyMedia

Display media such as an icon, image, or avatar.

PropTypeDefaultDescription
variant"default" | "icon""default"Visual style for the media. Use icon for a muted rounded icon container.
classNamestring-Additional Tailwind classes merged with the component styles (last one wins).

EmptyTitle

PropTypeDefaultDescription
classNamestring-Additional Tailwind classes merged with the component styles (last one wins).

EmptyDescription

PropTypeDefaultDescription
classNamestring-Additional Tailwind classes merged with the component styles (last one wins).

EmptyContent

Display actions such as a button, input, or link.

PropTypeDefaultDescription
classNamestring-Additional Tailwind classes merged with the component styles (last one wins).