Empty State

Dashed empty state panel with an icon slot, title, description and an optional call to action button. Use it for first run screens and empty lists in React.

src/registry/ui/empty-state.tsx/r/empty-state.json

No projects

Create your first project to get started.

Default

Installation#

bash
npx shadcn@latest add @minidev/empty-state

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/empty-state.json

Usage#

tsx
import { EmptyState } from "@/components/ui/empty-state"

export function Example() {
  return (
    <EmptyState className="max-w-sm" title="No projects" description="Create a project to begin." actionLabel="New project" />
  )
}

API reference#

EmptyState props
PropTypeDefault
title*string-
descriptionstring-
actionLabelstring-
onAction() => void-
iconReact.ReactNode-
classNamestring-

* required

Dependencies#

npm

React only

Built from

Examples#

All alerts, toasts and empty states

Learn more