EN
Getting started
54 · Extended UI

Empty state

A box shown in place of the table when a list is empty or a search returns no results. It tells users why they see nothing and, where possible, suggests the next step.

PRO acun:empty-state
01

Basic usage

title is required and should be a short sentence describing the state. Use description to explain in one sentence what can be done.

LIVE EXAMPLE
<acun:empty-state title="No orders yet" description="There are no orders recorded for this store this month." />
PropValues
titleRequired state heading
descriptionOptional description
02

With an icon

The icon slot places a muted icon above the title. Pick a single icon that describes the state and use it with acun:icon at around size="8".

LIVE EXAMPLE
<acun:empty-state title="No documents uploaded" description="The customer's invoices and contract documents are listed here.">
    <acun:slot:icon><acun:icon name="folder-open" size="8" stroke="1.5" /></acun:slot:icon>
</acun:empty-state>
PropValues
iconSlot: icon above the title
03

With an action button

The action slot adds a button below the description. Offer a single action that gets the user out of the empty state.

LIVE EXAMPLE
<acun:empty-state title="No records found" description="Try changing your search or filter criteria.">
    <acun:slot:icon><acun:icon name="magnifying-glass" size="8" stroke="1.5" /></acun:slot:icon>
    <acun:slot:action><acun:button variant="white" size="sm">Clear filters</acun:button></acun:slot:action>
</acun:empty-state>
PropValues
actionSlot: button below the description
04

First record and no results

Tell the two cases apart: when there are no records at all, guide the user to create the first one; when a search or filter returns nothing, suggest changing the search. DataTable makes this distinction on its own as well.

LIVE EXAMPLE
<div class="grid gap-4 md:grid-cols-2">
    <acun:empty-state title="No products added yet" description="Add the first product to start selling.">
        <acun:slot:icon><acun:icon name="cube" size="8" stroke="1.5" /></acun:slot:icon>
        <acun:slot:action><acun:button size="sm">New Product</acun:button></acun:slot:action>
    </acun:empty-state>

    <acun:empty-state title="No results found" description="No products match “headphnes”.">
        <acun:slot:icon><acun:icon name="magnifying-glass" size="8" stroke="1.5" /></acun:slot:icon>
        <acun:slot:action><acun:button variant="white" size="sm">Clear search</acun:button></acun:slot:action>
    </acun:empty-state>
</div>
API

Props and slots

The values the component accepts.

PropDefaultDescription
title — Required. State heading
descriptionnullDescription below the title
Slots: icon: icon above the title · action: action below the description.
Acun UI · Empty stateDetailed usage and examples