Empty
Present an empty or unavailable application state with optional media and actions.
Empty is an application-level presentation primitive. It provides a consistent layout for an empty-state message, optional media, and actions. Your application decides when to show it; Empty does not inspect collections or search results.
Basic usage#
Playground#
Anatomy#
Usage#
Compose only the parts you need. All parts belong inside Empty. Media accepts arbitrary JSX, including Icon, Avatar, AvatarGroup, and images; it does not impose a fixed media size or background.
Empty.Title renders a div by default. Choose an explicit heading such as as="h2" when the surrounding page needs one. Empty adds no role or ARIA relationships automatically.
The sm, md, and lg sizes change padding, spacing, typography, and action gaps together. Use sm within a Card or table, md for ordinary content, and lg for a page-level empty state. Vertical padding is more generous than horizontal insets. Title and description stay grouped, with more space around media and actions. Size does not resize the content placed inside Media.
Examples#
Basic empty state#
Actions#
Use actions to offer the next useful step. Wire them to your application’s handlers.
No search results#
Your search logic decides when to render this message.
Rich media#
Compose avatars or your own illustration without changing Empty’s layout API.
Sizes#
Custom container styling#
Empty has no default border, background, shadow, or fixed height. Apply container styling through class and style; use root classes and styles to customize individual parts throughout the family. A part’s own class and style take precedence over those family overrides.
Props#
Empty#
Props for Empty. Renders a <div> element by default.
Media#
Renders a <div> element by default.
Title#
Renders a <div> element by default.
Description#
Renders a <p> element by default.
Actions#
Renders a <div> element by default.