Skip to content

Empty State

⋯

EmptyState provides the Figma message layout in sm, md, and lg sizes. The application supplies the illustration or icon, copy, and actions.

import { EmptyState } from "@nesra/ui/empty-state";
export function EmptyResults() {
return (
<EmptyState.Root>
<EmptyState.Content>
<EmptyState.Title>No results found</EmptyState.Title>
</EmptyState.Content>
</EmptyState.Root>
);
}

All parts are also exported from @nesra/ui.

EmptyState.Root
├── EmptyState.Visual (optional consumer illustration or icon)
├── EmptyState.Content
│ ├── EmptyState.Title
│ └── EmptyState.Description (optional)
└── EmptyState.Actions (optional consumer buttons or links)

Nothing here yet

No projects yet

Create a project to start organizing your work.

No data found

No data available at the moment. Please check back later or try refreshing.

The application composes the icon frame inside EmptyState.Visual. This example uses the Figma sm treatment: a 48px outer frame with a 40px inner frame and a muted icon.

No matching results

Try a different keyword or remove a filter.

The artwork below is assembled in this documentation example. @nesra/ui supplies the layout slot and does not bundle an illustration.

No documents yet

Upload your first document to see it here.

The sizes change spacing and message typography. Match composed actions to the same Button size. The consumer remains responsible for sizing its artwork: Figma’s illustration frames are 152×124px for sm, 172×136px for md, and 220×160px for lg; the featured icon frames are 48px for sm and md, and 56px for lg.

No results found

Try adjusting your search or filters.

No results found

Try adjusting your search or filters.

No results found

Try adjusting your search or filters.

Pass an application image as the visual when using an illustration:

<EmptyState.Visual>
<img src={illustrationUrl} alt="" width={172} height={136} />
</EmptyState.Visual>

EmptyState.Title uses --nesra-text-headline and EmptyState.Description uses --nesra-text-support, so text follows the active theme. The application supplies the visual. Use semantic roles in it so it switches too: the featured icon example uses --nesra-surface-card-bg-neutral with --nesra-stroke-border and --nesra-stroke-divider frames and an --nesra-icon-muted icon, as in Figma. Content placed on a brand fill such as --nesra-action-primary-default uses text-nesra-icon-on-brand and text-nesra-text-on-brand.

EmptyState.Title renders as h2 by default. Set as to the heading level appropriate for the page. The visual is hidden from assistive technology by default; set aria-hidden={false} on EmptyState.Visual and provide meaningful alternative text when the artwork conveys information missing from the message. The application owns button behavior and any live announcement when the empty state appears after a search or refresh.

The root centers its composed parts and provides the size context.

Prop Type Default Effect
size "sm" | "md" | "lg" "md" Sets layout spacing and message typography.

Accepts native div attributes, className, children, and a ref to the root element.

Holds a consumer supplied illustration or icon above the message.

Prop Type Default Effect
aria-hidden boolean | "true" | "false" true Hides decorative artwork. Set to false for meaningful art.

Accepts native div attributes, className, children, and a ref. The consumer controls the artwork dimensions.

Groups the title and optional description in a centered 352px maximum width.

Accepts native div attributes, className, children, and a ref.

Prop Type Default Effect
as "h2" | "h3" | "h4" | "h5" | "h6" "h2" Sets semantic heading level without changing its visual size.

Accepts native heading attributes, className, children, and a ref to the selected heading element.

Renders muted supporting text below the title. Accepts native p attributes, className, children, and a ref.

Arranges consumer supplied controls with 12px gaps and allows them to wrap. Accepts native div attributes, className, children, and a ref.

The supported light theme uses semantic color roles and typography tokens.