suiss/ui · Component
Empty
A placeholder that explains why a view has no content and what people can do next.
Empty is an open-source component from suiss/ui for React, React Native, SwiftUI and Jetpack Compose. The @esuiss/ui CLI copies its source into your project, so you own the code.
Empty is a centered container for empty states. Inside it, EmptyHeader groups an optional EmptyMedia with an EmptyTitle and EmptyDescription, and EmptyContent holds the actions, such as buttons, a search field or a help link. All parts are plain, styled elements with no interactive behavior of their own.
Use it when a list, folder, search or page has nothing to show. Keep the title short and use the description to suggest a next step.
Installation
CLI
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Manual
- Install the dependencies and add the
cnhelper:
- Copy the source into
components/ui/empty.tsx:
- Update the import paths to match your project.
Usage
Empty has a dashed border style but no border width by default; add border through className to show an outline. Set EmptyMedia to variant="icon" for a small icon in a tinted tile, or keep the default to render media such as a large icon or illustration as is. Links placed directly inside EmptyDescription are underlined.
Examples
Outline
An empty state with a visible dashed outline, added through className="border".
Default media
An empty state with a large icon in EmptyMedia using the default variant.
With search
A not-found state with an InputGroup search field and a support link in EmptyContent.
API Reference
Empty
The centered container for the empty state.
Also accepts the props of React.ComponentProps<"div">.
EmptyHeader
Groups the media, title and description.
Also accepts the props of React.ComponentProps<"div">.
EmptyMedia
Holds an icon or image above the title.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "icon" | "default" | icon places the icon in a small rounded bg-muted tile; default renders the media without a background. |
Also accepts the props of React.ComponentProps<"div">.
EmptyTitle
The short heading of the empty state.
Also accepts the props of React.ComponentProps<"div">.
EmptyDescription
Supporting text that explains the state or suggests a next step.
Also accepts the props of React.ComponentProps<"p">.
EmptyContent
Holds actions such as buttons, inputs or links.
Also accepts the props of React.ComponentProps<"div">.
Accessibility
EmptyTitlerenders adiv, not a heading. If the empty state should appear in the document outline, render a heading element inside it or pass the appropriate role and level.- Give interactive elements in
EmptyContentclear accessible names.
Notes
- Styling hooks:
data-slotvaluesempty,empty-header,empty-icon(onEmptyMedia),empty-title,empty-descriptionandempty-content. EmptyMediaalso setsdata-variant.EmptyDescriptionrenders adivelement even though it accepts paragraph props.- Uses the
muted,foreground,muted-foregroundandprimarytokens.

Empty is a centered column that fills the available space and holds an EmptyHeader with optional EmptyMedia, an EmptyTitle and an EmptyDescription, followed by EmptyContent for actions. Text is centered and the header and content are limited to a readable width.
Use it for empty lists, search results with no matches and first-run screens.
Installation
The CLI also adds what it builds on: Icon, Text.
Manual
-
Target iOS 17 or later.
-
Copy the theme files every view uses:
- Copy the source and every file it uses:
- Add the files to your app target.
- Set
minSdkto 24 or higher and add the dependencies:
- Copy the theme files every view uses:
- Copy the source and every file it uses:
- Update the
com.esuiss.uipackage names to match your project.
Usage
EmptyMedia has two variants: default shows its child as is, such as an illustration, and icon puts an Icon in a small rounded tile. Put buttons or links in EmptyContent.
Add a background class such as bg-muted to Empty for a filled panel.
Examples
Muted
A filled panel with only a title and description.

API Reference
Empty
Centered container.
Also accepts the props of ViewProps.
EmptyHeader
Column for media, title and description.
Also accepts the props of ViewProps.
EmptyMedia
Decorative icon or illustration.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "icon" | "default" | default or icon. |
Also accepts the props of ViewProps.
EmptyTitle
Heading.
Also accepts the props of React.ComponentProps<typeof Text>.
EmptyDescription
Supporting text.
Also accepts the props of React.ComponentProps<typeof Text>.
EmptyContent
Area for actions.
Also accepts the props of ViewProps.
Accessibility
EmptyTitlehas theheadingrole.EmptyMediais hidden from screen readers, so the title and description must carry the message.
Notes
- Uses
bg-muted,text-foregroundandtext-muted-foregroundtokens; light and dark follow the system appearance.

