Create

General

Empty

Copy page View as Markdown Open in ChatGPT Open in Claude

Use the Empty component to display an empty state.

Usage#

app.component.ts
import { WdsEmptyComponent } from '@wds/angular/empty';

Examples#

Default#

Create Project Import Project
Learn More →

Outline#

outline adds a dashed border.

Upload Files

Background#

Any background can be set with a class on the element.

Refresh

Avatar#

Without media="icon" the media slot shows an image or an avatar as is.

Leave Message

Input group#

/ Need help? Contact support

Slots#

The title and description slots replace the attributes when the text needs markup or links.

No results for “lit radio” Check the spelling or clear the filters.

API References#

wds-empty#

Empty state: no data, results or content. Media, title and description, with actions below. Empty sections take no space.

Attributes

AttributeTypeDefaultDescription
headingstring''Title. The title slot takes precedence.
descriptionstring''Description below the title. The description slot takes precedence.
heading-level.headingLevelnumber3Heading level for screen readers (aria-level).
mediaWdsEmptyMedia'default'Media style: icon shows the icon on a muted 40×40 background.
outlinebooleanfalseDashed border.

Slots

SlotDescription
(default)Content below the description, usually buttons or a search field.
media<svg> icon, image, avatar or spinner.
titleTitle (instead of heading).
descriptionDescription (instead of description), may contain links.

CSS parts (::part)

PartDescription
emptyThe container.
headerMedia, title and description.
mediaThe media container (with media="icon" the background behind the icon).
titleThe title.
descriptionThe description.
contentThe content below the description.

CSS custom properties

PropertyDescription
--wds-empty-paddingInner padding (default 24px, 48px from 768px width).
--wds-empty-radiusBorder radius.

Accessibility#

Screen reader#

The title has role="heading" with aria-level from heading-level (default 3). Set the level that fits the outline of the page.

The description is plain text. Media is decorative in the examples: give icons aria-hidden="true" and images alt="", or a real alt when the image carries information.

Keyboard support#

The empty state has no keyboard interaction of its own. Buttons, links and fields inside follow the page tab sequence.

Footer