> For AI agents: the complete documentation index is available at https://wallarm.github.io/design-system/llms.txt, the full documentation bundle is available at https://wallarm.github.io/design-system/llms-full.txt.

# Empty states

**Components:** [`EmptyState`](https://wallarm.github.io/design-system/components/empty-state.md), [`EmptyStateIllustration`](https://wallarm.github.io/design-system/components/empty-state.md), [`EmptyStateMessage`](https://wallarm.github.io/design-system/components/empty-state.md), [`EmptyStateTitle`](https://wallarm.github.io/design-system/components/empty-state.md), [`EmptyStateDescription`](https://wallarm.github.io/design-system/components/empty-state.md), [`EmptyStateActions`](https://wallarm.github.io/design-system/components/empty-state.md), [`EmptyStateLink`](https://wallarm.github.io/design-system/components/empty-state.md), [`TableEmptyState`](https://wallarm.github.io/design-system/components/table.md)


+7 more

[`Table`](https://wallarm.github.io/design-system/components/table.md), [`SelectEmptyState`](https://wallarm.github.io/design-system/components/select.md), [`FilterDropdownEmpty`](https://wallarm.github.io/design-system/components/filter-dropdown.md), [`FilterCascadeEmpty`](https://wallarm.github.io/design-system/components/filter-cascade.md), [`Tabs`](https://wallarm.github.io/design-system/components/tabs.md), [`TabsContent`](https://wallarm.github.io/design-system/components/tabs.md), [`Button`](https://wallarm.github.io/design-system/components/button.md)

An empty state is `EmptyState` placed where the content would be. The header around it stays.

## When to use

| Need                                                    | Use                                                                                                     | Not                                  |
| ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| A page table with no rows                               | `TableEmptyState` › `EmptyState type='collection-empty'`                                                | Hiding `PageHeader` or `PageToolbar` |
| A table in a drawer or section with no rows             | `EmptyState type='collection-empty'` as a direct `Table` child                                          | `TableEmptyState` (too tall)         |
| Search or filters matched nothing                       | `EmptyState` with "Reset filters"                                                                       | A create action                      |
| An earlier choice is missing ("Select a service first") | `EmptyState` with no actions                                                                            | Disabling the section silently       |
| A tab or popover panel with nothing in it               | `EmptyState` inside `TabsContent`                                                                       | Hiding the tab                       |
| A card, kanban column or chart with no data             | `EmptyState type='no-results'`                                                                          | The icon tile and a pixel title      |
| A `Select` with no options                              | Nothing: `SelectContent` shows `SelectEmptyState` itself                                                | A hand-built "No results" row        |
| A `FilterDropdown` search with no matches               | `FilterDropdownEmpty`                                                                                   | `EmptyState`                         |
| A `FilterCascade` search with no matches                | Nothing: `FilterCascadeEmpty` shows itself                                                              | `EmptyState`                         |
| One missing value in a cell or attribute                | The em dash `'—'`. See [Entity table](https://wallarm.github.io/design-system/patterns/entity-table.md) | `EmptyState`                         |
| Data is loading                                         | `Table isLoading` (skeleton rows)                                                                       | Any empty state                      |
| A list or table failed to load                          | `EmptyState` in place of the rows, with "Try again"                                                     | An `Alert` above an empty table      |

`type` sets the scale, not the cause. If the empty area fills a page, table or panel, use `collection-empty` (the default). If it sits in a small container, use `no-results`.

## Rules

**Composition**

- Compose the parts: `EmptyState` › `EmptyStateIllustration` (`collection-empty` only) › `EmptyStateMessage` › `EmptyStateTitle` + `EmptyStateDescription` › `EmptyStateActions` › `EmptyStateLink` (optional).
- `collection-empty` needs a title and a description. `no-results` needs one of them: a title in a column or card, a description in a chart.
- **Never** pass `type` to a part. Parts take the scale from `EmptyState`.
- There is no `size`, `variant`, `icon`, `title` or `action` prop, and no `className` on `TableEmptyState`.
- **Never** place a bare icon. Put one icon from `@wallarm-org/design-system/icons` in `EmptyStateIllustration` and leave its size alone.
- `EmptyState` is already a live region (`role='status'`). **Never** wrap it in another.

**Layout and spacing**

- `EmptyState` owns its spacing: `collection-empty` is 256–560px wide with 24px vertical padding and 16px gaps; `no-results` is 240px wide with 8px padding. **Never** add `py-*`, `gap-*` or `w-*` to it or its parts.
- In a page table, wrap it in `TableEmptyState`: it adds 128px vertical padding and renders only when there are no rows and `isLoading` is false, so it needs no guard.
- In a drawer or section table, render `EmptyState` directly in `Table`, guarded by `data.length === 0 && !isLoading`.
- **Never** wrap `EmptyState` in a `Card` or a bordered box.
- Keep `PageHeader`, `PageToolbar`, section headers and table column headers visible when empty.

**Copy and actions**

- Write the title as a short statement: "No rules yet". **Never** an accusation: "You have no rules".
- Keep the description to one or two sentences: what the user gets, or what unlocks the area.
- Show one create action per screen. If `PageActions` or a section header has the create button, the empty state has no button.
- If no header has a create button, put `Button size='medium'` in `EmptyStateActions`.
- If search or filters matched nothing, offer "Reset filters" as `Button variant='outline' color='neutral'`. **Never** a create action.
- If a list failed to load, say what failed ("Couldn't load triggers") and offer "Try again" as `Button variant='outline' color='neutral'`. If access is denied, name the permission and add no button.
- If a dependency is missing, name the choice that unlocks the area. **Never** say "No \{items} yet".
- If one area can be dependency-empty or nothing-yet, switch the copy.
- If each tab can be empty, write copy per tab. **Never** reuse one sentence across tabs.
- Pick an icon that names the entity: `Users` for users, `Shapes` for rules, `CheckCheck` for caught up, `History` for read.
- **Never** use an `Alert` or a toast to say a list is empty.

## Examples

A page table with nothing yet: `PageActions` has the create button, so the empty state has none.

The header, toolbar and column headers stay visible. Typing a search switches the copy to
"No results found" with "Reset filters": the app passes its own flag for the cause.

```tsx
import { useState } from 'react';
import { Button } from '@wallarm-org/design-system/Button';
import { EmptyState, EmptyStateActions, EmptyStateDescription, EmptyStateIllustration, EmptyStateMessage, EmptyStateTitle } from '@wallarm-org/design-system/EmptyState';
import { Bell, FilterX, SearchX } from '@wallarm-org/design-system/icons';
import { Page, PageActions, PageContent, PageDescription, PageHeader, PageHeaderGroup, PageTitle, PageToolbar } from '@wallarm-org/design-system/Page';
import { SearchInput } from '@wallarm-org/design-system/SearchInput';
import { Table, TableEmptyState } from '@wallarm-org/design-system/Table';

export const Default = () => {
  const [query, setQuery] = useState('');

  const isFiltered = query.trim() !== '';

  const handleReset = () => setQuery('');

  return (
    <Page name='triggers' fullSize fixedHeight data-testid='triggers-page'>
      <PageHeader>
        <PageHeaderGroup className='flex-1'>
          <PageTitle>Triggers</PageTitle>
          <PageDescription>
            Automatic reactions to attacks, incidents and new API endpoints.
          </PageDescription>
        </PageHeaderGroup>
        <PageActions>
          <Button size='medium' onClick={onCreateTrigger} data-testid='triggers-create'>
            Create trigger
          </Button>
        </PageActions>
      </PageHeader>

      <PageToolbar>
        <SearchInput
          value={query}
          onChange={setQuery}
          placeholder='Search triggers'
          className='w-320'
          data-testid='triggers-search'
        />
      </PageToolbar>

      <PageContent>
        <Table
          aria-label='Triggers'
          data={[]}
          columns={TRIGGER_COLUMNS}
          getRowId={getTriggerId}
          data-testid='triggers-table'
        >
          <TableEmptyState>
            {isFiltered ? (
              <EmptyState data-testid='triggers-no-results'>
                <EmptyStateIllustration>
                  <SearchX />
                </EmptyStateIllustration>
                <EmptyStateMessage>
                  <EmptyStateTitle>No results found</EmptyStateTitle>
                  <EmptyStateDescription>
                    Try resetting your search or filters.
                  </EmptyStateDescription>
                </EmptyStateMessage>
                <EmptyStateActions>
                  <Button size='medium' variant='outline' color='neutral' onClick={handleReset}>
                    <FilterX />
                    Reset filters
                  </Button>
                </EmptyStateActions>
              </EmptyState>
            ) : (
              <EmptyState data-testid='triggers-empty-state'>
                <EmptyStateIllustration>
                  <Bell />
                </EmptyStateIllustration>
                <EmptyStateMessage>
                  <EmptyStateTitle>No triggers yet</EmptyStateTitle>
                  <EmptyStateDescription>
                    Create one to block an IP or notify your team when an attack matches its
                    condition.
                  </EmptyStateDescription>
                </EmptyStateMessage>
              </EmptyState>
            )}
          </TableEmptyState>
        </Table>
      </PageContent>
    </Page>
  );
};
```

Search or filters matched nothing: reset, never create.

The table has rows: "Reset filters" clears the search and they come back.

```tsx
import { useState } from 'react';
import { Button } from '@wallarm-org/design-system/Button';
import { EmptyState, EmptyStateActions, EmptyStateDescription, EmptyStateIllustration, EmptyStateMessage, EmptyStateTitle } from '@wallarm-org/design-system/EmptyState';
import { FilterX, SearchX } from '@wallarm-org/design-system/icons';
import { Page, PageActions, PageContent, PageDescription, PageHeader, PageHeaderGroup, PageTitle, PageToolbar } from '@wallarm-org/design-system/Page';
import { SearchInput } from '@wallarm-org/design-system/SearchInput';
import { Table, TableEmptyState } from '@wallarm-org/design-system/Table';

export const NoResults = () => {
  const [query, setQuery] = useState('graphql');

  const search = query.trim().toLowerCase();
  const rows = TRIGGERS.filter(trigger => trigger.name.toLowerCase().includes(search));

  const handleReset = () => setQuery('');

  return (
    <Page name='triggers' fullSize fixedHeight data-testid='triggers-page'>
      <PageHeader>
        <PageHeaderGroup className='flex-1'>
          <PageTitle>Triggers</PageTitle>
          <PageDescription>
            Automatic reactions to attacks, incidents and new API endpoints.
          </PageDescription>
        </PageHeaderGroup>
        <PageActions>
          <Button size='medium' onClick={onCreateTrigger} data-testid='triggers-create'>
            Create trigger
          </Button>
        </PageActions>
      </PageHeader>

      <PageToolbar>
        <SearchInput
          value={query}
          onChange={setQuery}
          placeholder='Search triggers'
          className='w-320'
          data-testid='triggers-search'
        />
      </PageToolbar>

      <PageContent>
        <Table
          aria-label='Triggers'
          data={rows}
          columns={TRIGGER_COLUMNS}
          getRowId={getTriggerId}
          data-testid='triggers-table'
        >
          <TableEmptyState>
            <EmptyState data-testid='triggers-no-results'>
              <EmptyStateIllustration>
                <SearchX />
              </EmptyStateIllustration>
              <EmptyStateMessage>
                <EmptyStateTitle>No results found</EmptyStateTitle>
                <EmptyStateDescription>Try resetting your search or filters.</EmptyStateDescription>
              </EmptyStateMessage>
              <EmptyStateActions>
                <Button size='medium' variant='outline' color='neutral' onClick={handleReset}>
                  <FilterX />
                  Reset filters
                </Button>
              </EmptyStateActions>
            </EmptyState>
          </TableEmptyState>
        </Table>
      </PageContent>
    </Page>
  );
};
```

A drawer or section table: `EmptyState` is a direct `Table` child, hidden while loading.

No `TableEmptyState` here: its 128px vertical padding is too tall for a section.

```tsx
import { EmptyState, EmptyStateDescription, EmptyStateIllustration, EmptyStateMessage, EmptyStateTitle } from '@wallarm-org/design-system/EmptyState';
import { Heading } from '@wallarm-org/design-system/Heading';
import { Shapes } from '@wallarm-org/design-system/icons';
import { Table } from '@wallarm-org/design-system/Table';

export const SectionTable = () => {
  const isLoading = false;

  return (
    <div className='flex w-640 flex-col gap-12 p-24' data-testid='mapping-rules-section'>
      <Heading size='lg' weight='medium'>
        Mapping rules
      </Heading>
      <Table
        aria-label='Mapping rules'
        data={MAPPING_RULES}
        columns={MAPPING_RULE_COLUMNS}
        getRowId={getMappingRuleId}
        isLoading={isLoading}
        data-testid='mapping-rules-table'
      >
        {MAPPING_RULES.length === 0 && !isLoading && (
          <EmptyState data-testid='mapping-rules-empty-state'>
            <EmptyStateIllustration>
              <Shapes />
            </EmptyStateIllustration>
            <EmptyStateMessage>
              <EmptyStateTitle>No rules yet</EmptyStateTitle>
              <EmptyStateDescription>
                Create one to grant a role or a group from a claim this provider sends.
              </EmptyStateDescription>
            </EmptyStateMessage>
          </EmptyState>
        )}
      </Table>
    </div>
  );
};
```

A missing dependency: name the choice that unlocks the area, with no action.

The section header stays visible. **Never** "No operations yet".

```tsx
import { EmptyState, EmptyStateDescription, EmptyStateIllustration, EmptyStateMessage, EmptyStateTitle } from '@wallarm-org/design-system/EmptyState';
import { Heading } from '@wallarm-org/design-system/Heading';
import { Link2 } from '@wallarm-org/design-system/icons';

export const Dependency = () => (
  <div className='flex w-640 flex-col gap-12 p-24' data-testid='operations-section'>
    <Heading size='lg' weight='medium'>
      Operations
    </Heading>
    <EmptyState data-testid='operations-empty-state'>
      <EmptyStateIllustration>
        <Link2 />
      </EmptyStateIllustration>
      <EmptyStateMessage>
        <EmptyStateTitle>Select a service first</EmptyStateTitle>
        <EmptyStateDescription>Choose a service to pick its operations.</EmptyStateDescription>
      </EmptyStateMessage>
    </EmptyState>
  </div>
);
```

Empty tabs: each tab gets its own copy and an icon that names the case.

A notification panel: no action, and every tab stays visible.

```tsx
import { useState } from 'react';
import { EmptyState, EmptyStateDescription, EmptyStateIllustration, EmptyStateMessage, EmptyStateTitle } from '@wallarm-org/design-system/EmptyState';
import { CheckCheck, History } from '@wallarm-org/design-system/icons';
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@wallarm-org/design-system/Tabs';

export const EmptyTabs = () => {
  const [tab, setTab] = useState('unread');

  return (
    <div className='w-400 p-24'>
      <Tabs value={tab} onChange={setTab} data-testid='notifications-tabs'>
        <TabsList>
          <TabsTrigger value='unread'>Unread</TabsTrigger>
          <TabsTrigger value='read'>Read</TabsTrigger>
        </TabsList>
        <TabsContent value='unread'>
          <EmptyState data-testid='notifications-unread-empty'>
            <EmptyStateIllustration>
              <CheckCheck />
            </EmptyStateIllustration>
            <EmptyStateMessage>
              <EmptyStateTitle>You're all caught up</EmptyStateTitle>
              <EmptyStateDescription>
                New attacks and incidents will show up here.
              </EmptyStateDescription>
            </EmptyStateMessage>
          </EmptyState>
        </TabsContent>
        <TabsContent value='read'>
          <EmptyState data-testid='notifications-read-empty'>
            <EmptyStateIllustration>
              <History />
            </EmptyStateIllustration>
            <EmptyStateMessage>
              <EmptyStateTitle>Nothing read yet</EmptyStateTitle>
              <EmptyStateDescription>
                Notifications you open move to this tab.
              </EmptyStateDescription>
            </EmptyStateMessage>
          </EmptyState>
        </TabsContent>
      </Tabs>
    </div>
  );
};
```

Small containers: a kanban column gets a title only, a chart card a description only.

`type='no-results'` has no illustration. Centre it in the column or the card body.

```tsx
import { Card, CardContent, CardHeader, CardTitle } from '@wallarm-org/design-system/Card';
import { EmptyState, EmptyStateDescription, EmptyStateMessage, EmptyStateTitle } from '@wallarm-org/design-system/EmptyState';
import { NumericBadge } from '@wallarm-org/design-system/NumericBadge';
import { Text } from '@wallarm-org/design-system/Text';

export const SmallContainers = () => (
  <div className='flex gap-16 p-24'>
    <div
      className='flex h-320 w-280 flex-col gap-8 rounded-12 border border-border-primary-light p-12'
      data-testid='incidents-column-open'
    >
      <div className='flex items-center gap-8'>
        <Text size='sm' weight='medium'>
          Open
        </Text>
        <NumericBadge>1</NumericBadge>
      </div>
      <div className='flex flex-col gap-4 rounded-8 border border-border-primary p-12'>
        <Text size='sm' weight='medium'>
          SQL injection on /api/v2/payments
        </Text>
        <Text size='xs' color='secondary'>
          payments.acme-bank.com
        </Text>
      </div>
    </div>
    <div
      className='flex h-320 w-280 flex-col gap-8 rounded-12 border border-border-primary-light p-12'
      data-testid='incidents-column-in-progress'
    >
      <div className='flex items-center gap-8'>
        <Text size='sm' weight='medium'>
          In progress
        </Text>
        <NumericBadge>0</NumericBadge>
      </div>
      <div className='flex flex-1 items-center justify-center'>
        <EmptyState type='no-results' data-testid='incidents-column-empty'>
          <EmptyStateMessage>
            <EmptyStateTitle>Nothing runs here yet</EmptyStateTitle>
          </EmptyStateMessage>
        </EmptyState>
      </div>
    </div>
    <Card className='h-320 w-400' data-testid='attacks-chart'>
      <CardHeader>
        <CardTitle>Attacks by type</CardTitle>
      </CardHeader>
      <CardContent className='flex flex-1 items-center justify-center'>
        <EmptyState type='no-results' data-testid='attacks-chart-empty'>
          <EmptyStateMessage>
            <EmptyStateDescription>No data found for selected period</EmptyStateDescription>
          </EmptyStateMessage>
        </EmptyState>
      </CardContent>
    </Card>
  </div>
);
```

## States

| State                                  | Show                                                                                           | Example component                  |
| -------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------- |
| Loading                                | Skeleton rows, no empty state                                                                  | `Table isLoading`                  |
| Nothing yet, create button in a header | "No \{items} yet" + what creating one does; no button                                          | `TableEmptyState` › `EmptyState`   |
| Nothing yet, no create button anywhere | Title, description, `Button size='medium'`                                                     | `EmptyState` › `EmptyStateActions` |
| Filters matched nothing                | "No results found" + "Reset filters"                                                           | `EmptyState` › `EmptyStateActions` |
| Earlier choice missing                 | "Select a service first", no action                                                            | `EmptyState`                       |
| Tab empty                              | Per-tab copy, no action: "You're all caught up" (`CheckCheck`), "Nothing read yet" (`History`) | `EmptyState` in `TabsContent`      |
| Column, card or chart empty            | Title only, or description only in a chart                                                     | `EmptyState type='no-results'`     |
| List failed to load                    | "Couldn't load \{items}" + "Try again"; while retrying, skeleton rows                          | `EmptyState` › `EmptyStateActions` |

## What your app owns

- **The cause.** The DS cannot tell nothing-yet, filtered and dependency-missing apart. Pass your own flag.
- **Copy.** `EmptyState` has no default strings.
- **Dependency gating.** Show the dependency state until the earlier field has a value. See [Create and edit forms](https://wallarm.github.io/design-system/patterns/create-edit-forms.md).
- **Errors.** There is no error `type`: pass the failure and the retry yourself. A failed page, not a list, is your own message in `PageContent`.
- **Notification center.** No popover block exists. Compose `Popover`, `Tabs` and `EmptyState`.
- **Kanban.** No kanban component exists. Centre `EmptyState type='no-results'` in your column.
- **Figma drift.** Figma flags the empty state component for an update. Follow the code scale until it changes.

## Related

- [Resource list page](https://wallarm.github.io/design-system/patterns/resource-list-page.md)
- [Entity table](https://wallarm.github.io/design-system/patterns/entity-table.md)
- [Detail drawer](https://wallarm.github.io/design-system/patterns/detail-drawer.md)
- [Create and edit forms](https://wallarm.github.io/design-system/patterns/create-edit-forms.md)
- [Filtering](https://wallarm.github.io/design-system/patterns/filtering.md)
- [Spacing](https://wallarm.github.io/design-system/foundations/spacing.md)
- [Typography](https://wallarm.github.io/design-system/foundations/typography.md)
