Theme Playground

Commerce

EmptyState

Centered fallback state for empty results, empty carts, empty wishlists, and similar zero-data moments. Supports presets or fully custom copy with optional CTA.

Best for

empty search stateswishlist and cart fallbacksno-results messaging

Import

import { EmptyState } from "@enadhq/enad-react-sdk/client/storefront"

When to use it

Use EmptyState when a view has no data to show: empty cart, empty wishlist, no search results, no reviews, or end of a paginated list. It provides a centered fallback with a message and optional recovery action.

Composition notes

EmptyState works in two modes:

  • Preset mode: pass a variant like "empty-cart", "no-results", "no-reviews", "no-wishlist", or "end-of-list" to get built-in copy.
  • Custom mode: pass title, description, and optionally icon for fully custom messaging.
  • action is a ReactNode slot for a CTA button that helps the visitor recover (e.g., "Continue shopping", "Clear filters").

Both modes can be combined: a preset variant provides default copy, and custom props override specific fields.

Behavior and theming guidance

The component centers its content vertically and horizontally with generous padding. Keep the title short and the description actionable. The recovery action should always give visitors a clear next step.

Examples

Live examples you can edit directly in the sandbox.

2 examples

Preset empty cart

Use a built-in preset when you want consistent cart copy with a single recovery action.

Custom no-results state

Override the title and body when search or filter flows need more specific guidance.

Component Sets

Preview the first example across the available component-set presets to compare tone, spacing, and structural defaults.

Props

PropTypeDefaultDescription
variantstring
Use a preset for default title/description
iconstring
Custom icon or illustration slot
titlestring
No description yet.
descriptionstring
No description yet.
actionstring
CTA button or link
classNamestring
No description yet.