Empty State
A placeholder for an empty list, search or page, with the action that fills it.Basic
Preview
Code
No projects yet
Projects keep your files and team in one place.Installation
Package
CLI (copy source)
pnpm
pnpm add @advui/corenpm
npm install @advui/coreUsage
import { Button, EmptyState } from '@advui/core'
import { MailIcon } from '@advui/icons'
<EmptyState
icon={<MailIcon />}
title="No messages"
description="New messages will show up here."
>
<Button>Compose</Button>
</EmptyState>Examples
No search results
Preview
Code
No results for “invoice 2024”
Check the spelling or try a shorter search.API reference
EmptyState
| Prop | Type | Default | Description |
|---|---|---|---|
title | ReactNode | — | Short heading. |
description | ReactNode | — | One or two sentences. |
icon | ReactNode | — | Icon in a circle above the title. |
children | ReactNode | — | Actions, usually Buttons. |
headingLevel | 1 | 2 | 3 | 4 | 5 | 6 | 3 | Heading level of the title. |
bordered | boolean | false | Dashed border, for empty areas inside a page. |
tone | 'default' | 'error' | 'default' | Colors of the icon circle. |
Accessibility
- The title is a heading (
h3by default), so screen-reader users can find it; setheadingLevelto fit the page outline. - The icon is decorative and hidden from assistive technology.