Skip to content

EmptyState

Placeholder component for empty views — when there's no data, no search results, or content hasn't been created yet. Features decorative concentric rings around an icon for visual emphasis.

Also known as: empty view, no data, blank slate, zero state

View in Storybook

When to use

  • Showing a meaningful message when a list, table, or view has no content.
  • Guiding users to take action (create, upload, search again).
  • Providing visual feedback after an empty search or filter result.

Import

tsx
import { EmptyState } from '@vacano/ui'

Usage

tsx
<EmptyState
  icon={<SearchIcon />}
  title="No results found"
  description="Your search did not match any results. Please try again."
  actions={<Button>New project</Button>}
/>

Without icon

tsx
<EmptyState
  title="Nothing here"
  description="There is no content to display at this time."
/>

With actions

tsx
<EmptyState
  icon={<FileTextIcon />}
  title="No documents"
  description="Get started by creating your first document."
  actions={
    <>
      <Button variant="transparent">Learn more</Button>
      <Button>Create document</Button>
    </>
  }
/>

Title only

tsx
<EmptyState icon={<SearchIcon />} title="No results found" />

Props

PropTypeDefaultDescription
iconReactNode-Icon displayed inside the concentric rings
titleReactNoderequiredMain heading text
descriptionReactNode-Supporting text below the title
actionsReactNode-Action buttons or links
classNamestring-CSS class name for the root element
classnamesEmptyStateClassNames-Custom class names for sub-elements
refRef<HTMLDivElement>-Ref forwarded to the root element
data-test-idstring-Test identifier attribute

EmptyStateClassNames

KeyDescription
iconIcon area with concentric rings
titleTitle heading
descriptionDescription text
actionsActions container

Released under the MIT License.