EmptyState
Feedback

EmptyState

Zero-results / zero-data placeholder for tables, panels, and filtered views.

Props

EmptyState extends HTMLAttributes<HTMLDivElement> (minus title).

EmptyStateProps props
PropTypeDefaultDescription
iconReactNode—Icon before the message.
titleReactNode—Primary message.
descriptionReactNode—Secondary explanatory text.
actionReactNode—Action content.
compactboolean—Tighter paddings for inside a card or table body.

Examples

Basic

No results found
EmptyState (basic)

With icon

EmptyState with icon

With action

EmptyState with action

Compact

No items
This list is empty.
EmptyState (compact)
ImportTSX
import { EmptyState } from "@solarius/onset";
import { Button } from "@solarius/onset";
import { IconSearch } from "@tabler/icons-react";

<EmptyState
  icon={<IconSearch size={20} />}
  title="No results found"
  description="Try adjusting your search criteria."
  action={<Button variant="primary">Clear filters</Button>}
/>;