Empty State
A composed placeholder for zero data, filtered results, and first-run experiences.
Empty State explains why a collection or result region has nothing to show and, when useful, gives the user one clear next step.
No projects yet
Create your first project to organize tasks, files, and conversations in one place.
Import
Section titled “Import”import { EmptyState } from "@zentara-co/zenos-ui";Anatomy
Section titled “Anatomy”Compose only the parts the message needs. EmptyState.Header keeps the decorative media and copy on a readable measure. EmptyState.Actions is optional.
<EmptyState> <EmptyState.Header> <EmptyState.Media>{/* decorative icon */}</EmptyState.Media> <EmptyState.Title>No projects yet</EmptyState.Title> <EmptyState.Description>Create a project to get started.</EmptyState.Description> </EmptyState.Header> <EmptyState.Actions>{/* optional action */}</EmptyState.Actions></EmptyState>Choose the right message
Section titled “Choose the right message”Use Empty State for a valid zero-data result: a new workspace, an empty inbox, or a search with no matches. Lead with the condition, explain it in one short sentence, and add an action only when there is a useful next step.
Do not use it while data is still loading; use Skeleton or Loader. Use Alert for recoverable inline feedback that should not replace the whole content region. When a failed request does replace the region, a destructive empty state may include one retry action.
Semantic variants
Section titled “Semantic variants”The variant colors only EmptyState.Media. The surrounding layout, title, and description stay neutral so status color supports the message instead of becoming the entire surface. Icons are decorative and hidden from assistive technology.
No results
Nothing matched your current search and filters.
Couldn't load projects
Check your connection, then try loading this view again.
All caught up
There are no outstanding reviews in your queue.
Actions
Section titled “Actions”Prefer one small outline action. A primary action is appropriate when the empty state is a first-run experience and the next step is unambiguous. Avoid menus or several competing calls to action; link secondary guidance from the description or the surrounding page instead.
Empty State does not own button behavior. Compose Button or Link inside EmptyState.Actions, preserving their native focus, disabled, and navigation behavior.
Density
Section titled “Density”density="comfortable" is the default for page and panel states. density="compact" reduces the minimum height, padding, media size, and type scale for smaller cards, table regions, and popovers. Density also inherits from DensityProvider.
comfortable
Density changes spacing and type scale without changing the message.
compact
Density changes spacing and type scale without changing the message.
Custom styling
Section titled “Custom styling”The root is intentionally surface-free. Add a border, background, radius, or width with className to match its container. Every part—Root, Header, Media, Title, Description, and Actions—accepts as, className, style, native attributes, event handlers, and a correctly typed ref. Each also exposes a stable data-slot, and local classes merge last.
EmptyState.Media owns its default bottom margin directly, with no hidden wrapper, so a class such as mb-0 or mb-6 can replace it. Use as when the default element does not fit the page semantics—for example, render Title as h2, Description as div, or Actions as footer. Prefer semantic tokens to keep light and dark themes aligned.
Build your workspace
Variants
defaultprimarysuccesswarninginfodestructive EmptyState.Root EmptyState.Header EmptyState.Media EmptyState.Title EmptyState.Description EmptyState.Actions
API
| Prop | Type | Default | Description |
|---|---|---|---|
variant | default | primary | success | warning | info | destructive | default | Changes the decorative media color while leaving the title, description, and layout neutral. |
density | comfortable | compact | comfortable | Controls minimum height, spacing, media size, and type scale. Inherits from DensityProvider when omitted. |
as | ElementType | — | Changes the rendered element on Root, Header, Media, Title, Description, or Actions and supplies its native prop and ref types. |
role / aria-live | native ARIA attributes | — | Opt into a live status only when an existing result region changes to an empty state. |
className | string | — | Merged last on every part for custom surfaces, borders, dimensions, and media treatment. |
native props | React.HTMLAttributes<HTMLElement> | — | Forwards native attributes, events, aria-*, data-*, className, style, and ref. |
Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props,
including className, style, aria-*, and data-*.
Accessibility
Section titled “Accessibility”EmptyState.Title renders an h3 by default; keep it in the page’s heading order or change it with as to match the surrounding section. EmptyState.Media is decorative and uses aria-hidden="true", so the title and description must carry the meaning.
The root has no live-region role by default. For an empty state that replaces existing search results after an interaction, keep the region mounted and add role="status" with aria-live="polite". Do not announce a static first-run state or duplicate a nearby status message.