Skip to Content
BlocksEmptyStateBlock

EmptyStateBlock

An empty state display with illustration, title, description, and action buttons.

Import

import { EmptyStateBlock } from "@raydenui/ui/blocks";

Usage

Preview
<EmptyStateBlock illustration="task-templates" title="No tasks to show" description={`You don't have any pending tasks for today.\nAdd new tasks to track productivity`} action={{ label: "New Task", icon: "plus" }} />

No Results Variant

Preview
<EmptyStateBlock illustration="search" illustrationColored={false} title="No results found" description={`"Access" did not match any results.\nPlease try again`} />

Card Variant

<EmptyStateBlock illustration="gallery" variant="card" title="Ready to add some photos?" description={`Tap the button below to upload and\nshare photos with your community`} action={{ label: "Upload Photos", icon: "upload" }} />

Illustrations

illustration accepts an IllustrationName. These nineteen are the complete set:

IllustrationIllustrationIllustration
calendarchatcontacts
dashboardfavoritesfile-manager
formsgalleryinbox
invoicenotificationsproduct-catalog
project-listsearchshopping-cart
subscriptionssurveytask-templates
team

Props

PropTypeDefaultDescription
illustrationIllustrationName—Required. One of the nineteen names above.
titlestring—Required. Bold title text.
descriptionstring—Required. Supports \n for line breaks.
actionEmptyStateBlockAction—A single optional action.
variant"inline" | "card""inline"inline has no wrapper; card draws a --color-surface panel.
illustrationColoredbooleantrueColoured or monochrome illustration.
illustrationPalettestring[]—Literal colours. A customisation surface, not a theme role.
illustrationSizenumber—Illustration size in pixels.
classNamestring—Additional class names.

illustrationPalette values do not follow light or dark mode. Supply mode-appropriate colours yourself, or omit it to inherit the flavor’s illustration palette.

EmptyStateBlockAction

PropTypeRequiredDescription
labelstringYesButton label.
iconReactNode | IconNameNoA library icon name or your own node.
onClick() => voidNoClick handler.

States

Default only. The block presents an absence your application has already detected.

Accessibility

  • Illustrations are decorative and hidden from assistive technology.
  • The action is a native button with a visible focus ring.
  • description supports multi-line content through \n.

Known limitations

  • variant selects the wrapper, not the illustration. The illustration is chosen with the separate illustration prop.
  • Exactly one action is supported. There is no secondary action.
  • The block does not distinguish an empty source from a search with no matches — that difference lives entirely in the title and description you pass. The two demos above show both wordings.
Last updated on