AppEmptyState
The friendly placeholder a card or section shows when it has nothing to display yet.
<app-empty-state icon="folder-open" title="No projects yet" text="Create your first project." />An empty state is what a card or section shows when it has loaded but has nothing to display — no projects, no notifications, no results. <app-empty-state> turns that blank space into a clear moment: an icon, a title, a line of guidance, and usually the one action that fills it.
Its look comes entirely from the shared @webority/theme, so the Razor <app-empty-state> and the React <AppEmptyState> render identically — the same placeholder on every Webority surface.
Playground
Every attribute, live. Each change re-renders the real tag helper on the server, so the markup underneath is the exact call that produced the placeholder above it.
Anatomy
An icon bubble, a title, optional body text, and an optional action — usually the primary next step that turns the empty state into a full one.
Show code
<app-empty-state icon="folder-open" title="No projects yet"
text="Create your first project to get started.">
<app-button variant="primary" left-icon="plus" class="mt-3">New project</app-button>
</app-empty-state>
Sizes
Two type scales. md (default) is the page or card empty state; sm is the tighter variant for a widget or tile.
Show code
<app-empty-state icon="folder-open" title="No projects yet"
text="Create your first project to get started." />
<app-empty-state icon="bell" size="sm" title="No notifications"
text="You're all caught up." />
When to use
Use it when
- A card or section has loaded but there is genuinely nothing to show.
- A first-run experience where the user hasn't created anything yet.
- A filtered or searched view returned no matches and you want to explain why.
Reach for something else when
- The data is still loading (first fetch). → AppSkeleton
- The empty result lives inside a data table body. → AppTableEmptyState
- Something went wrong fetching the data. → AppAlert
- You just need a one-line "nothing here" with no framing. → a muted caption
Best practices
Every option
The whole surface of the component, one cell per value — every size, every combination of icon/title/text/action, and the edge cases (missing icon, missing action, long text).
size — both scales
size="md"
size="sm"
icon
icon="folder-open"icon="search"no iconicon-size="48"content combinations
title onlytitle + texttitle + action, no text
title + text + action
no icon, no action — text onlynothing but title — every optional attribute omittededge cases
long text overflowsize="sm" + full content — the tighter widget/tile variant with everything
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
| icon | string | — | Bootstrap Icons glyph for the bubble (React icon, which also accepts a custom node). Optional. |
| icon-size | int | 24 | Glyph size in px (React iconSize). |
| size | md | sm | md | Type scale — sm is the tighter widget/tile variant. |
| title | string | — | The heading — name what's missing (React title, which also accepts a node). |
| text | string | — | Supporting line of guidance below the title (React text, which also accepts a node). |
| (content) | markup | — | Inner content renders as the action slot — usually the next-step app-button (React action). |