Skip to content

DataListEmpty

The empty state of a data list: a localized title and hint, an icon and room for actions.

On this page

Examples

Default texts

The title and the hint are localized in the 12 languages of Klyroo.UI and follow the culture of the user.

No results

Try changing your search or your filters.

Razor
<div class="w-full max-w-lg rounded-xl border border-dashed border-(--klyroo-border-accented)">
    <KlyDataListEmpty data-testid="empty-default" />
</div>

With actions

Actions sit under the text; an empty Description or Icon hides that part.

No invoices match

Nothing matches "overdue" in 2026.

Razor
<div class="w-full max-w-lg rounded-xl border border-dashed border-(--klyroo-border-accented)">
    <KlyDataListEmpty Title="No invoices match" Description="Nothing matches &quot;overdue&quot; in 2026." data-testid="empty-actions">
        <Actions>
            <KlyButton Label="Clear filters" Variant="ButtonVariant.Outline" Color="KlyColor.Neutral" />
        </Actions>
    </KlyDataListEmpty>
</div>

API

KlyDataListEmpty

The empty state of a data list: an icon, a title, a description and optional actions. The table and the grid draw it when there are no rows.

Parameters

Name Type Description
Class string Classes added to the root element, merged last so they win over the theme.
Description string The text under the title. Without it, the localized hint to change the search or the filters; an empty string shows none.
Icon string The icon above the title, by name (any icon name Klyroo.UI accepts). Defaults to search-x ; an empty string shows none.
Title string The title. Without it, the localized "No results".
Ui DataListEmptyUi Per-instance classes for each slot.

Slots

Name Type Description
Actions RenderFragment Buttons or links shown under the text, for example one that clears the filters.
ChildContent RenderFragment Extra content between the description and the actions.

Ui slots

Ui takes a DataListEmptyUi with one class string per slot, merged after the theme.

Slot Styles
Root The outer element of the empty state. Classes given here are merged with the theme classes of the slot.
Icon The icon of the empty state. Classes given here are merged with the theme classes of the slot.
Title The title of the empty state. Classes given here are merged with the theme classes of the slot.
Description The text under the title of the empty state. Classes given here are merged with the theme classes of the slot.
Actions The container of the actions of the empty state. Classes given here are merged with the theme classes of the slot.