Skip to content
Razor catalogue

On this page

@addTagHelper *, Webority.Ui.Razor

Parts

Give the empty state a title, guidance and one action, so the user can act without hunting for a button.

Icon, title, description and an action
No projects yet
Create your first project to get started.
Show code
<app-empty-state icon="folder-open" title="No projects yet" description="Create your first project to get started.">
    <app-button left-icon="plus" class="mt-3">New project</app-button>
</app-empty-state>

Sizes

Use md for a page or card, and sm for a tighter widget or tile where the md title would feel oversized.

md and sm
No projects yet
No notifications
Show code
<app-empty-state icon="folder-open" title="No projects yet" />
<app-empty-state icon="bell" size="Sm" title="No notifications" />

Table body

Use the table variant for the empty body of a data table, so the empty message sits where the rows would be.

Table with no rows
No results
Try adjusting your filters.
Show code
<app-empty-state variant="Table" icon="inbox" title="No results"
                 description="Try adjusting your filters." />

Illustrations

Pick a named drawing for a first-run, search or error moment; the title carries the meaning, not the picture.

Named drawings
No results
No data yet
Inbox zero
No notifications
No files
No access
You are offline
Something went wrong
Show code
<app-empty-state size="Sm" illustration="AppEmptyStateIllustration.NoResults" title="No results" />
<app-empty-state size="Sm" illustration="AppEmptyStateIllustration.NoData" title="No data yet" />
<app-empty-state size="Sm" illustration="AppEmptyStateIllustration.EmptyInbox" title="Inbox zero" />
<app-empty-state size="Sm" illustration="AppEmptyStateIllustration.NoNotifications" title="No notifications" />
<app-empty-state size="Sm" illustration="AppEmptyStateIllustration.NoFiles" title="No files" />
<app-empty-state size="Sm" illustration="AppEmptyStateIllustration.NoAccess" title="No access" />
<app-empty-state size="Sm" illustration="AppEmptyStateIllustration.Offline" title="You are offline" />
<app-empty-state size="Sm" illustration="AppEmptyStateIllustration.Error" title="Something went wrong" />

Your own drawing

Use your own decorative drawing when no named one fits; it is drawn unboxed at up to 120 pixels.

A custom SVG
No reports yet
Show code
<app-empty-state title="No reports yet">
    <app-empty-illustration><svg viewBox="0 0 120 80" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="10" y="10" width="100" height="60" rx="8"/><path d="M30 50l20-18 16 14 12-10 22 14"/></svg></app-empty-illustration>
</app-empty-state>

Every option

Every value of every prop, one cell each.

icon

icon="folder-open"
No projects yet
icon="search"
No results
no icon
No projects yet

illustration

illustration unset (default)
No projects yet
illustration="no-results"
No results
illustration="no-data"
No data yet
illustration="empty-inbox"
Inbox zero
illustration="no-notifications"
No notifications
illustration="no-files"
No files
illustration="no-access"
No access
illustration="offline"
You are offline
illustration="error"
Something went wrong
illustration=<svg> (app-empty-illustration child)
No reports yet

iconSize

icon-size="24" (default)
No notifications
icon-size="48"
No notifications

size

size="md" (default)
No projects yet
Create your first project to get started.
size="sm"
No notifications
You're all caught up.

variant

variant="card" (default)
No projects yet
variant="table"
No results
Try adjusting your filters.

title

title="Nothing here yet"
Nothing here yet
title="0"
0

description

description unset (default)
Empty
description="Try a broader keyword."
No results
Try a broader keyword.
description: long text wraps
No results for “risk assessment methodology”
Try a broader keyword, remove a filter, or check the spelling. None of the current filters returned a match in this workspace.

action

action unset (default)
No documents
Upload your first file to get started.
(content): app-button child
No documents
Upload your first file to get started.

className

class unset (default)
No messages
class="mt-4"
No messages

style

style unset (default)
No messages
style="opacity: 0.5"
No messages

Guidance

What to do, and what to avoid.

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.
  • A data table has loaded with no rows: use variant="table" for the table body.

Reach for something else when

  • The data is still loading (first fetch). → AppSkeleton
  • Something went wrong fetching the data. → AppAlert
  • You just need a one-line "nothing here" with no framing. → a muted caption

Offer a next step

Do
No team members yet
Invite a colleague to collaborate on this project.

Names what's missing, explains why it matters, and offers the exact action to fix it.

Avoid
Empty

A bare "Empty" with no guidance and no action leaves the user stuck at a dead end.

Explain a search with no matches

Do
No results for “risk”
Try a broader keyword or clear the filters.

A search-empty explains the specific query and suggests how to get results.

Avoid
No results

A bare "No results" with no reason and no way forward leaves the user unsure whether to change the search or the data.

Keep the description specific

Do
No requests this week
Requests you raise appear here once they are submitted.

A description that says what the empty state means helps the user, where filler only pads the space.

Avoid
No results
No results found. No results found. No results found.

Repetitive filler text pads the space without helping the user do anything.

Reference

Try every prop, read the full list, and check keyboard and screen reader behaviour.

folder-open search bell inbox users (none)
(none) no-results no-data empty-inbox no-notifications no-files no-access offline error
md sm
card table
No projects yet
Create your first project to get started.
React, generated from the controls
<AppEmptyState icon="folder-open" title="No projects yet" description="Create your first project to get started." action={<AppButton>New project</AppButton>} />
Razor, the same props
<app-empty-state icon="folder-open" title="No projects yet" description="Create your first project to get started.">
    <app-button>New project</app-button>
</app-empty-state>

8 props. The 5 most used come first.

Used on most screens 5 props

PropTypeDefaultDescription
icondefault - string - Semantic icon name for the bubble. Needed unless illustration is set, which replaces the bubble.
sizedefault md md | sm md The type scale: md is the page or card empty state, sm is the tighter widget or tile variant with a smaller title and text.
variantdefault card card | table card The look: card is the card or section empty state; table is the body of a data table, with a larger disc above the title. The table look has no sm scale, so size sm with table adds both classes.
titledefault - string - The heading: name what's missing.
descriptiondefault - string - Supporting line of guidance below the title.

Less common 3 props

PropTypeDefaultDescription
illustrationdefault - no-results | no-data | empty-inbox | no-notifications | no-files | no-access | offline | error - Decorative drawing by name, in theme colours that follow dark mode. Replaces the icon bubble when set.
icon-sizedefault 24 int 24 Size of the icon in the bubble, in pixels.
(content)default - markup - Inner content renders as the action slot, usually the next-step app-button.

Screen reader

3 notes
  • A named illustration is decorative; the title carries the meaning for assistive technology.
  • A custom illustration node is wrapped with aria-hidden, so it is skipped by screen readers.
  • The title and text are plain text blocks, read in order with the action last.

Do and avoid

3 pairs

Offer a next step

Do
No team members yet
Invite a colleague to collaborate on this project.

Names what's missing, explains why it matters, and offers the exact action to fix it.

Avoid
Empty

A bare "Empty" with no guidance and no action leaves the user stuck at a dead end.

Explain a search with no matches

Do
No results for “risk”
Try a broader keyword or clear the filters.

A search-empty explains the specific query and suggests how to get results.

Avoid
No results

A bare "No results" with no reason and no way forward leaves the user unsure whether to change the search or the data.

Keep the description specific

Do
No requests this week
Requests you raise appear here once they are submitted.

A description that says what the empty state means helps the user, where filler only pads the space.

Avoid
No results
No results found. No results found. No results found.

Repetitive filler text pads the space without helping the user do anything.