Dark Light
System
Default LBBW Jira Confluence Source Code
Share
Playground

Empty State

<afp-empty-state> Since 1.4.0 stable This component uses the light DOM, so its markup and styles are part of the regular document flow.

Empty states are used to communicate that there is no data to display, no search results, or an error occurred.

Examples #

Use the header attribute to include a header section in the content.

No sales available

No Data Type #

Use the no-data type when there is no data to display (e.g., empty tables).

No sales available

No Results Type #

Use the no-results type when a search or filter returns no matching items.

No results found

Error Type #

Use the error type when data could not be loaded or a feature is not available.

Unable to load data

Custom Icon #

Use the icon property to specify a custom icon name, or use the icon slot for full control.

No documents

Compact Size #

Use the compact size for use within cards, tables, or smaller containers.

No items

Standard Size (Full Page) #

Use the standard size (default) for full-page or section placeholders.

Your inbox is empty

Without Actions #

Empty states can be displayed without action buttons when no immediate action is needed.

No notifications

With Primary Action Only #

Display only a primary action when there's one main action to take.

No team members

Custom Content #

Use the default slot to add custom content below the description.

No upcoming events

Check back later or create a new event to get started.

Custom Actions Slot #

Use the actions slot for full control over the action buttons.

Your cart is empty

Browse Products View Wishlist

Custom Icon Slot #

Use the icon slot to provide a completely custom icon element.

Custom Icon

Custom CSS Properties #

Customize the appearance using CSS custom properties.

No favorites

Properties

Learn more about properties.

Name Description Reflects
header
Whether to show the header section.
Type boolean
Default false
description
Optional description text that explains the reason or next step.
Type string | undefined
icon
The name of the icon to display. Uses afp-icon component.
Type string | undefined
primaryAction
primaryaction
Label text for the primary action button.
Type string | undefined
secondaryAction
secondaryaction
Label text for the secondary action button.
Type string | undefined
size
Size variant of the empty state.
Type
AfpEmptyStateSize
Name Description
COMPACT
Compact size for use within cards or tables.
STANDARD
Standard size for full-page or section placeholders.
AfpEmptyStateSize
Default AfpEmptyStateSize.STANDARD
emptyStateType
emptystatetype
Predefined variant for common empty state patterns.
Type
AfpEmptyStateType
Name Description
NO_DATA
No data variant (e.g., no sales figures available).
NO_RESULTS
No results variant (e.g., search returns no hits).
ERROR
Error/Not available variant (e.g., feature not available or data could not be loaded).
CUSTOM
Custom variant for user-defined content.
AfpEmptyStateType
Default AfpEmptyStateType.CUSTOM

Events

Learn more about events.

Name Return Description
afp-click { action: 'primary' | 'secondary' }
Emitted when an action button is clicked.

Slots

Learn more about slots.

Name Description
default
The default slot for custom content below the description.
icon
Custom icon slot to override the default icon.
actions
Custom actions slot to override the default action buttons.
header
Slot for the header content.

CSS Parts

Learn more about CSS Parts.

Name Description Selector
base
The component's base wrapper.
::part(base)
icon
The icon container.
::part(icon)
content
The content container (header and description).
::part(content)
header
The header container.
::part(header)
description
The description element.
::part(description)
actions
The actions container.
::part(actions)
primary-action
The primary action button.
::part(primary-action)
secondary-action
The secondary action button.
::part(secondary-action)

CSS Custom Properties

Name Description Default
--afp-empty-state-padding
The padding inside the empty state container.
--afp-space-xl
--afp-empty-state-gap
The gap between sections.
--afp-space-m
--afp-empty-state-icon-size
The size of the icon.
--afp-size-3xl
--afp-empty-state-icon-color
The color of the icon.
--afp-color-text-subtle
--afp-empty-state-max-width
The maximum width of the content.
24rem

Dependencies

The component automatically brings in the listed items, including any nested dependencies that may exist.

afp-icon afp-button

Importing

Using the bundle is the recommended method to include components. If you’d rather handle imports manually, you can use the code examples below.

import '@afp-design-system/core/dist/components/empty-state/empty-state.js';
Share
Create a link with a predefined theme that is automatically applied when the generated link is opened. Default LBBW Presentation Mode
Abort Copy Link