# Flux 2.0 — Empty state What a region shows when it has nothing in it: why, and the one thing to do next. Reference: https://flux.kaptio.com/components/empty-state/ Requires: https://flux.kaptio.com/tokens/v2/flux.css and flux-components.css ## Use it when Replaces a blank table, list or panel with a short heading that says what is missing, one sentence on why or what fills it, and at most one action. It sits inside the surface that would have held the content, so the page keeps its structure. A first-use state invites the first record; a filtered state offers to clear the filters; a table keeps its headers and spans the empty state across every column. ## Do not use it when Not for an error: say what failed and offer a retry in a Note. Not while content is loading; use a Skeleton or a Spinner. Not as an illustration-led marketing panel. ## Markup ### First use, in a card

Departures

No departures yet

Add the first departure for Golden Circle Classic, and it will appear here with its allocation and guide.

### Filtered to nothing

No bookings match these filters

Nothing departs in October with the status Awaiting supplier.

### In a table
Supplier requests
Reference Supplier Status Rooms

No open requests

Every supplier has answered. New requests appear here when a booking needs space confirmed.

## API - flux-empty (class): The empty state. Place it inside the surface that would have held the content. - flux-empty__icon (class): On the svg. Optional. - flux-empty__title (class): On a heading, or a p inside a table cell. - flux-empty__body (class): One sentence. - flux-empty__actions (class): The action row. - flux-empty--compact (class): Less vertical padding, for table cells, panels and filtered results. ## Accessibility - Use a heading for the title when the region has headings of its own, at the next level down. - When a search or filter empties the results, announce it through the live result count that the table or search already has. - The icon is decorative and carries aria-hidden. ## Keyboard - Tab: Reaches the action, if there is one. The rest is not interactive. ## Tokens - --flux-empty-padding | -gap | -measure - --flux-empty-icon | -icon-size - --flux-empty-title-size | -body ## Do - Say what is missing in the title and what fills it in the body. - Keep the region’s own heading, headers and toolbar in place. - Offer the action that ends the empty state: create the first one, or clear the filters. ## Do not - Do not add an illustration, a mascot or a gradient panel. - Do not offer more than one primary action. - Do not centre more than the title and the one sentence below it.