Empty State

A placeholder UI for when a section has no content.

components/ui/blocks.tsxexportEmptyState
blockfeedback
Loading preview...

Installation

Terminal
npx baseui-cn add empty-state

Usage

Code
import { EmptyState, EmptyStateIcons } from "@/components/ui/blocks"
import { Button } from "@/components/ui/button"
;<EmptyState
  icon={EmptyStateIcons.folder}
  title="No projects yet"
  description="Create your first project to get started."
  action={<Button>Create project</Button>}
/>

Examples

With outline border

Use className="border border-dashed" for a dashed container style.

Loading preview...

API

EmptyState

The registry block lives in components/ui/blocks.tsx. The local composable Empty helpers are separate APIs.

PropTypeDefaultDescription
titlestringRequiredEmpty state heading.
descriptionstring—Supporting guidance.
iconReactNode—Optional decorative media.
actionReactNode—Compose approved Button actions.
size"sm" | "md" | "lg""md"Content spacing and type size.
classNamestring—Container customization.