A placeholder component for empty states or error messages. The border is not part of the component; it is shown only for illustration purposes.

No Groups

Agents can be grouped together and assigned the same policies.

For full-screen placeholders, a block with larger-sized elements can be used.

No Groups

Agents can be grouped together and assigned the same policies.

The component size is set using the size attribute.

No Groups

Agents can be grouped together and assigned the same policies.

Content can be aligned to the center or to the top. The alignTop attribute selects the top.

No Groups

Agents can be grouped together and assigned the same policies.

No Groups

Agents can be grouped together and assigned the same policies.

The component has no height of its own: it grows as a flex item, and in any other container it is exactly as tall as its content, which leaves both alignments looking the same. Give the component or its container a height — the examples here use min-height — for the alignment to have an effect.

The Empty State component can be used to display an error message. It is switched on with the errorColor attribute: the title and the text turn red, and an icon in the illustration slot is tinted with them.

Failed to load records

There is a problem with the network or the database connection. Please try again or contact your administrator.

The illustration size can be changed. A large illustration is suitable for full-screen placeholders. If a placeholder is needed for just a specific block, the illustration can be made compact or omitted entirely.

Empty state

No Groups

Agents can be grouped together and assigned the same policies.
Empty state

No Groups

Agents can be grouped together and assigned the same policies.

In a center-aligned component with an illustration, an additional bottom offset is added, which raises the composition to provide optical compensation.

An icon can be used as the illustration.

This should detail the actions you can take on this screen, as well as why it’s valuable.

No Groups

Agents can be grouped together and assigned the same policies.

One or more actions can be placed below the text: buttons, links, and pseudo-links.

Agents can be grouped together and assigned the same policies.
Agents can be grouped together and assigned the same policies.
No information

When a slot is rendered conditionally, the condition has to be top level: the @if wraps the slot element itself.

@if (failed()) {
<i kbq-empty-state-icon kbq-icon-item="kbq-triangle-exclamation_16"></i>
}

Blocks nested in one another, and several elements in one block, do not work — that is how content projection behaves in Angular. Such content never reaches the DOM, with no error and no warning.

When there are several variants, give each its own @if at the same level: @if (hasIcon() && wrapped()) and @if (hasIcon() && !wrapped()).

The title is rendered with heading typography — subheading at the normal size, headline at the big one — so write it as a real heading of the level the surrounding page calls for, <h2 kbq-empty-state-title>, rather than as a div. The component zeroes the browser's own heading margin, so the spacing stays the same whichever element is used.

An empty state is usually inserted into a page that has already been read: after a search returns nothing, or after a request fails. Add role="status" on <kbq-empty-state> so that assistive technology announces it, or role="alert" for the error variant, which is announced more insistently.

The component adds no role of its own, because an empty state that is part of the page from the start — an initially empty list, say — has nothing to announce.

Suggestions for improvement
If you found a mistake or want to improve the article, create an issue on GitHub.