Components

Empty State

A React empty state component with shadcn/ui's Empty API — icon tile, title, description and actions on a quiet dashed surface — plus an animated empty state block with a floating illustration, drifting icons and a staggered entrance built with Motion.

  • shadcn API
  • Server Component friendly
  • Motion block
  • prefers-reduced-motion

Your inbox is empty

New messages from your team and integrations will land here.

Installation

$ npx shadcn@latest add https://duskui.com/r/empty.json

Adds components/ui/empty.tsx with the same parts as shadcn's Empty, plus an outline prop. CSS only.

Usage

no-projects.tsx
import { FolderPlus } from "lucide-react"
import { Button } from "@/components/ui/button"
import {
  Empty,
  EmptyContent,
  EmptyDescription,
  EmptyHeader,
  EmptyMedia,
  EmptyTitle,
} from "@/components/ui/empty"

export function NoProjects() {
  return (
    <Empty>
      <EmptyHeader>
        <EmptyMedia variant="icon">
          <FolderPlus />
        </EmptyMedia>
        <EmptyTitle>No projects yet</EmptyTitle>
        <EmptyDescription>Create your first project to get started.</EmptyDescription>
      </EmptyHeader>
      <EmptyContent>
        <Button>Create project</Button>
      </EmptyContent>
    </Empty>
  )
}

Examples

Default

EmptyMedia variant="icon" puts a single icon in a small neutral tile. The surface has a quiet dashed outline.

No projects yet

Create your first project to start shipping, or import one from GitHub.

No results

Inside a card or panel, pass outline={false} to drop the border. Links in the description are underlined and brighten on hover.

No results for “date range picker”

Check the spelling or try a broader term. You can also browse all components.

Blocks

Ready-made variations composed from the base component with Motion. Each installs on its own and pulls in its dependencies automatically.

Animated Empty

A floating tile holds your icon while up to three satellite icons drift slowly around it. The title, description and actions rise in one after another when the block scrolls into view. Pass any lucide icons; children become the action row.

Your inbox is empty

New messages from your team and integrations will land here.

$ npx shadcn@latest add https://duskui.com/r/animated-empty.json
PropTypeDefaultDescription
titleReactNode—The headline. Required.
descriptionReactNode—Supporting text.
iconLucideIconInboxIcon in the floating tile.
satellitesLucideIcon[][Search, FileText, Sparkles]Up to three drifting icons. [] for none.
titleAs"h2" | "h3" | "h4" | "p""h3"Heading level of the title, to fit your page outline.
childrenReactNode—Actions under the text, usually Buttons.
outlinebooleantrueDashed border (from Empty).

Custom illustration

Swap the icons to fit the moment — a rocket with clouds and bolts for an empty deployments list — and set titleAs so the heading level matches where it sits.

No deployments yet

Push to your main branch or deploy from the CLI and your first build will show up here.

$ npx shadcn@latest add https://duskui.com/r/animated-empty.json

API Reference

Same parts as shadcn/ui: Empty, EmptyHeader, EmptyMedia, EmptyTitle, EmptyDescription and EmptyContent. Each forwards the props of its element.

PropTypeDefaultDescription
outlinebooleantrueEmpty. Dashed border. Turn off inside cards.
variant"default" | "icon""default"EmptyMedia. icon wraps a single icon in a tile; default leaves your illustration as is.

Accessibility

  • EmptyTitle is a <div> like shadcn's; nest a heading inside when the empty state belongs in the page outline. Animated Empty renders one for you (titleAs).
  • Illustrations and decorative icons are aria-hidden, so screen readers hear only the title, description and actions.
  • When an empty state replaces results after a search or filter, put its text in a live region (role="status") so the change is announced.
  • Under prefers-reduced-motion the illustration stays still and the content fades in without moving.