Theme studio

Design a theme, preview it live, then export it. Saved in this browser.

Quick picks #10b981
Generated scale
50100200300400500600700800900
Some text is below AA

EmptyState

  • Stable
  • WCAG 2.2 evidence
  • RTL

Explains why a list, table or page has no content and what to do next. The title is a heading and the description is text, so the message never depends on the picture (WCAG 1.1.1, 1.3.1); the icon tile and illustration are decorative. Presentational: renders in React Server Components; the action slots take client components such as Button. Consumer duties: title and description wording, a heading level that fits the page, and real actions in the slots. Use Alert for errors.

import { EmptyState } from "@nexera-ui/react";
Loading example…
5
examples
9
props
4
live controls
1
platform
7
WCAG criteria
11
blocks use it

Try every prop. Copy the code.

Change the props and the code updates. Check light and dark, LTR and RTL, and phone width.

Loading…
title
description
size
variant
Generated code
import { EmptyState } from "@nexera-ui/react";

<EmptyState />

Examples 4

The same examples as Storybook, rendered live. Open Code to copy one.

With illustration

Variant=Illustration: the illustration slot replaces the icon tile.

Loading example…

Both actions

Both actions (Show secondary): the secondary action comes first. The row wraps when the container is narrow.

Loading example…

Long content

A search with no results, without actions. Long titles and descriptions wrap (translation adds 30 to 40 %).

Loading example…

Right to left

Right-to-left: the actions run from the right; the block stays centred.

Loading example…

Props 9

Press "Try it" on a card to load that prop into the playground.

9 props shown

title*Nexera
ReactNode

What is empty, for example "No employees yet". Rendered as a heading (headingLevel). Wraps, never truncated.

Default –
descriptionNexera
ReactNode

What to do next, for example "Add your team one by one or import everyone from a spreadsheet." Shown when provided.

Default –
sizeNexera
"sm" | "md" | "lg"

Width, type scale and tile size: up to 280, 400 or 480 px wide.

Default sm
headingLevelNexera
1 | 2 | 3 | 4 | 5 | 6

Heading level of the title. Pick the level that fits the page outline (WCAG 1.3.1): one below the heading of the section the empty state sits in.

Default 2
primaryActionNexera
ReactNode

Main action, for example <Button size="sm">Add employee</Button>. Shown when provided, after the secondary action. Use size="sm" with size="sm" and size="md" with md and lg, as in Figma.

Default –
secondaryActionNexera
ReactNode

Second action, for example <Button variant="secondary" size="sm">Import CSV</Button>. Shown when provided, before the primary action.

Default –
variantNexera
"icon" | "illustration"

Visual above the text: icon shows icon in a round tile, illustration shows illustration. Visual above the text.

Default icon
iconNexera
ReactNode

Glyph for the tile, for example <IconUsers />. Shown when provided. Decorative: hidden from assistive technology, so put the meaning in title.

Default –
illustrationNexera
ReactNode

Illustration: an <img> or <svg> that fills a 96 x 72, 136 x 102 or 160 x 120 px box. Decorative: hidden from assistive technology, so put the meaning in title.

Default –

* Required. React Aria props shown are the ones most apps use; the component accepts the rest of its React Aria props too.

Accessible by default.

Built on React Aria, and covered by the WCAG 2.2 evidence generated on every build.

WCAG 2.2 evidence

4 direct · 3 supporting
  • 1.1.1Non-text ContentLevel A · tested directly
  • 1.3.1Info and RelationshipsLevel A · tested directly
  • 1.3.2Meaningful SequenceLevel A · supporting test
  • 1.4.10ReflowLevel AA · supporting test
  • 1.4.12Text SpacingLevel AA · supporting test
  • 2.1.1KeyboardLevel A · tested directly
  • 4.1.2Name, Role, ValueLevel A · tested directly

Fits any width.

Nexera components respond to the space they are given. Drag the corner of the frame, or pick a width.

0 px · drag the corner

Styling hooks

Pass className to add Tailwind classes (merged last). State is exposed as data attributes, so you can style it with variants like data-pressed:.

Usage
<EmptyState className="shadow-sm" />

Used in blocks

Related components