A generic centered placeholder for empty lists, grids, or search results: an optional icon, a description, and an optional action. Modeled on AntD's `Empty` — reusable anywhere something has nothing to show yet.

pnpm add @behivetech/molecules.empty-state

You are viewing Empty State v0.3.4, snapshotted 2026-11-09. The latest is v0.3.5. Go to the latest →

A generic centered placeholder for empty lists, grids, or search results: an optional icon, a description, and an optional action. Modeled on AntD's Empty — reusable anywhere something has nothing to show yet.

Usage

1import { EmptyState } from "@behivetech/molecules.empty-state";
2import { Button } from "@behivetech/atoms.button";
3
4function Example() {
5 const onAdd = () => alert("add a block");
6 return (
7 <EmptyState icon="🧩" description="No blocks yet. Add one to get started.">
8 <Button onClick={onAdd}>+ Add Block</Button>
9 </EmptyState>
10 );
11}

Properties

EmptyState props

PropTypeDefaultDescription
description*ReactNode—Message explaining the empty state
childrenReactNode—Action content rendered below the description (typically a Button)
classNamestring—Additional class names to merge with the component root element
iconReactNode—Icon or illustration shown above the description

Also accepts the native attributes of its root element (className, aria-*, event handlers, …).