Empty State

Displays a placeholder when content is empty or unavailable.

Overview

The EmptyState component provides a consistent way to communicate that a section has no content to display. By default it fills the available parent space, centers its content, and renders a solid surface shell. Use variant="ghost" when the parent already owns the surrounding surface, and use variant="overlay" when the empty state should sit above existing content.

Usage

import {
  EmptyState,
  EmptyStateDescription,
  EmptyStateHeading,
  EmptyStateMedia,
  EmptyStateTitle,
} from "@tilt-legal/cubitt-components/primitives";
import { Inbox } from "@tilt-legal/cubitt-icons/ui/outline";
<EmptyState>
  <EmptyStateMedia>
    <Inbox />
  </EmptyStateMedia>
  <EmptyStateHeading>
    <EmptyStateTitle>No projects found</EmptyStateTitle>
    <EmptyStateDescription>
      Create your first project to get started with your workflow.
    </EmptyStateDescription>
  </EmptyStateHeading>
</EmptyState>

Examples

Ghost

Use variant="ghost" when the parent already provides the border, background, or padding.

Overlay

Use variant="overlay" when the empty state should sit on top of existing content, such as a table with skeleton rows.

With Action Button

Use EmptyStateAction to add a call-to-action inside the empty state.

Error State

Set error on EmptyState to apply error styling to EmptyStateMedia and EmptyStateTitle.

API Reference

EmptyState

The root container component. By default it fills the available parent space with centered content and generous padding.

PropTypeDefaultDescription
variant"default" | "ghost" | "overlay""default"default renders the solid shell, ghost removes shell styling, and overlay positions the state absolutely with a gradient background
errorbooleanfalseEnables error styling for EmptyStateMedia and EmptyStateTitle
classNamestring-Additional CSS classes. Use this to override the default fill, spacing, or surface styling
childrenReact.ReactNode-Child components

EmptyStateMedia

Container for the icon with a circular background. Automatically applies error styling when the parent has error.

PropTypeDefaultDescription
size"sm" | "default" | "lg""default"Controls the media circle and icon size
classNamestring-Additional CSS classes
childrenReact.ReactNode-Icon element

EmptyStateHeading

Container for the title and description.

PropTypeDefaultDescription
classNamestring-Additional CSS classes
childrenReact.ReactNode-Title and description

EmptyStateTitle

The title text. Automatically applies error styling when the parent has error.

PropTypeDefaultDescription
classNamestring-Additional CSS classes
childrenReact.ReactNode-Title content

EmptyStateDescription

The description text.

PropTypeDefaultDescription
classNamestring-Additional CSS classes
childrenReact.ReactNode-Description content

EmptyStateAction

Container for action buttons.

PropTypeDefaultDescription
classNamestring-Additional CSS classes
childrenReact.ReactNode-Button element(s)

Design Guidelines

When to Use

  • Empty lists, tables, or grids
  • Search results with no matches
  • Error states when data fails to load
  • First-time user experiences

Best Practices

  • Always provide a clear, actionable title
  • Include a helpful description explaining what the user can do
  • Use variant="ghost" when a parent container already owns the surrounding shell
  • Use variant="overlay" when content should stay mounted underneath
  • When appropriate, include an action button to help users resolve the empty state
  • Use the error state for failed data loading, not for validation errors

On this page