> 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.

# EmptyState

EmptyState communicates that a space has no content — whether because a collection is empty, a search returned no matches, or a filter is too narrow. Use compound components: EmptyStateIllustration, EmptyStateMessage, EmptyStateTitle, EmptyStateDescription, EmptyStateActions, EmptyStateLink.

`type` picks the scale, and every slot follows it from context — no need to restate it on children. `collection-empty` is the page-level treatment: a medallion (a 36px raised tile holding a 20px icon), a pixel title, and room for actions plus a link. `no-results` is the compact inline treatment for a card, dropdown or select menu: 240px wide, with a 14px secondary title. An illustration always carries the medallion — there is no bare glyph.

Scale is not the same question as cause. A page-level "no filter matches" state still uses `collection-empty` — it just drops the create CTA and offers a neutral one instead.

[Source](https://github.com/wallarm/design-system/tree/main/packages/design-system/src/components/EmptyState) · [Storybook](https://wallarm.github.io/design-system/storybook/?path=/docs/pages-emptystate--overview)

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

export const CollectionEmpty = () => (
  <EmptyState>
    <EmptyStateIllustration>
      <Shapes />
    </EmptyStateIllustration>
    <EmptyStateMessage>
      <EmptyStateTitle>Title text goes here</EmptyStateTitle>
      <EmptyStateDescription>
        Description text explains what happened and what the user can do next.
        <br />
        One to two sentences maximum.
      </EmptyStateDescription>
    </EmptyStateMessage>
    <EmptyStateActions>
      <Button size='medium'>Reset filters</Button>
      <Button size='medium' variant='outline' color='neutral'>
        Refresh
      </Button>
    </EmptyStateActions>
    <EmptyStateLink href='#'>Link</EmptyStateLink>
  </EmptyState>
);
```

## Usage

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

## Examples

### No filter results

The page-level state for a search or filter that matched nothing. Same
`collection-empty` scale as an untouched collection — the difference is the
CTA: a neutral "get back to something" action, never a create action, because
the data exists and the query is what needs changing.

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

export const NoFilterResults = () => (
  <EmptyState>
    <EmptyStateIllustration>
      <Zap />
    </EmptyStateIllustration>
    <EmptyStateMessage>
      <EmptyStateTitle>No attacks found</EmptyStateTitle>
      <EmptyStateDescription>Try to apply different filter or reset it.</EmptyStateDescription>
    </EmptyStateMessage>
    <EmptyStateActions>
      <Button size='medium' variant='outline' color='neutral'>
        Refresh
      </Button>
    </EmptyStateActions>
  </EmptyState>
);
```

### Minimal

The compact state at its spec default: no icon, no actions — just the title
and subtitle. This is the shape most in-app empty states take.

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

export const Minimal = () => (
  <EmptyState>
    <EmptyStateMessage>
      <EmptyStateTitle>No results</EmptyStateTitle>
      <EmptyStateDescription>Short description</EmptyStateDescription>
    </EmptyStateMessage>
  </EmptyState>
);
```

### No results examples

The compact form in its real homes — a chart card with no data, and a `Select` whose option list came back empty. An empty inside a container stays action-light however it got that way.

```tsx
import { Card, CardContent, CardHeader, CardTitle } from '@wallarm-org/design-system/Card';
import { EmptyState, EmptyStateDescription, EmptyStateMessage } from '@wallarm-org/design-system/EmptyState';
import { Field, FieldLabel } from '@wallarm-org/design-system/Field';
import { Select, SelectButton, SelectContent, SelectPositioner } from '@wallarm-org/design-system/Select';
import { HStack, VStack } from '@wallarm-org/design-system/Stack';

export const NoResultsExamples = () => (
  <HStack gap={32} align='start'>
    {/* In a chart card */}
    <Card className='w-[340px]'>
      <CardHeader>
        <CardTitle>Bar chart</CardTitle>
      </CardHeader>
      <CardContent className='flex items-center justify-center py-48'>
        <EmptyState type='no-results'>
          <EmptyStateMessage>
            <EmptyStateDescription>No data found for selected period</EmptyStateDescription>
          </EmptyStateMessage>
        </EmptyState>
      </CardContent>
    </Card>

    {/* In a select dropdown */}
    <VStack gap={4} className='w-[260px]'>
      <Field>
        <FieldLabel>Label</FieldLabel>
        <Select collection={emptyCollection}>
          <SelectButton placeholder='Select' />
          <SelectPositioner className='w-[260px]'>
            <SelectContent />
          </SelectPositioner>
        </Select>
      </Field>
    </VStack>
  </HStack>
);
```

### Medallion

The medallion reads as a lit surface: a top-down gradient, a hairline border,
a soft drop shadow and an inner top highlight. Every layer resolves through
`--color-component-empty-state-medallion-*` and
`--shadow-empty-state-medallion`, so it holds up on both the card surface and
the slightly darker page surface it sits on — shown here side by side. Use the
toolbar theme switcher to check it in dark.

```tsx
import { EmptyStateIllustration } from '@wallarm-org/design-system/EmptyState';
import { ScanLine } from '@wallarm-org/design-system/icons';
import { HStack } from '@wallarm-org/design-system/Stack';
import { cn } from '@wallarm-org/design-system/utils/cn';

export const Medallion = () => (
  <HStack gap={0} className='w-[330px] overflow-hidden rounded-16 border border-border-primary'>
    {(['bg-bg-surface-1', 'bg-bg-light-primary'] as const).map(surface => (
      <div key={surface} className={cn('flex flex-1 justify-center py-28', surface)}>
        <EmptyStateIllustration>
          <ScanLine />
        </EmptyStateIllustration>
      </div>
    ))}
  </HStack>
);
```

## Props

| Prop           | Type                                                 | Default            | Description |
| -------------- | ---------------------------------------------------- | ------------------ | ----------- |
| type           | `"collection-empty" \| "no-results" \| undefined`    | `collection-empty` |             |
| title          | `string \| undefined`                                |                    |             |
| defaultChecked | `boolean \| undefined`                               |                    |             |
| defaultValue   | `string \| number \| readonly string[] \| undefined` |                    |             |
| autoFocus      | `boolean \| undefined`                               |                    |             |
| id             | `string \| undefined`                                |                    |             |
| tabIndex       | `number \| undefined`                                |                    |             |
| rel            | `string \| undefined`                                |                    |             |
| onChange       | `ChangeEventHandler<T, Element> \| undefined`        |                    |             |
| data-testid    | `string \| undefined`                                |                    |             |

### EmptyStateActions

| Prop           | Type                                                 | Default | Description |
| -------------- | ---------------------------------------------------- | ------- | ----------- |
| defaultChecked | `boolean \| undefined`                               |         |             |
| defaultValue   | `string \| number \| readonly string[] \| undefined` |         |             |
| autoFocus      | `boolean \| undefined`                               |         |             |
| id             | `string \| undefined`                                |         |             |
| tabIndex       | `number \| undefined`                                |         |             |
| title          | `string \| undefined`                                |         |             |
| rel            | `string \| undefined`                                |         |             |
| onChange       | `ChangeEventHandler<T, Element> \| undefined`        |         |             |

### EmptyStateDescription

| Prop           | Type                                                 | Default | Description |
| -------------- | ---------------------------------------------------- | ------- | ----------- |
| title          | `string \| undefined`                                |         |             |
| defaultChecked | `boolean \| undefined`                               |         |             |
| defaultValue   | `string \| number \| readonly string[] \| undefined` |         |             |
| autoFocus      | `boolean \| undefined`                               |         |             |
| id             | `string \| undefined`                                |         |             |
| tabIndex       | `number \| undefined`                                |         |             |
| rel            | `string \| undefined`                                |         |             |
| onChange       | `ChangeEventHandler<T, Element> \| undefined`        |         |             |

### EmptyStateIllustration

| Prop           | Type                                                 | Default | Description |
| -------------- | ---------------------------------------------------- | ------- | ----------- |
| defaultChecked | `boolean \| undefined`                               |         |             |
| defaultValue   | `string \| number \| readonly string[] \| undefined` |         |             |
| autoFocus      | `boolean \| undefined`                               |         |             |
| id             | `string \| undefined`                                |         |             |
| tabIndex       | `number \| undefined`                                |         |             |
| title          | `string \| undefined`                                |         |             |
| rel            | `string \| undefined`                                |         |             |
| onChange       | `ChangeEventHandler<T, Element> \| undefined`        |         |             |

### EmptyStateLink

| Prop           | Type                                                              | Default | Description |
| -------------- | ----------------------------------------------------------------- | ------- | ----------- |
| download       | `any`                                                             |         |             |
| href           | `string \| undefined`                                             |         |             |
| hrefLang       | `string \| undefined`                                             |         |             |
| target         | `HTMLAttributeAnchorTarget \| undefined`                          |         |             |
| type           | `string \| undefined`                                             |         |             |
| defaultChecked | `boolean \| undefined`                                            |         |             |
| defaultValue   | `string \| number \| readonly string[] \| undefined`              |         |             |
| autoFocus      | `boolean \| undefined`                                            |         |             |
| id             | `string \| undefined`                                             |         |             |
| tabIndex       | `number \| undefined`                                             |         |             |
| title          | `string \| undefined`                                             |         |             |
| rel            | `string \| undefined`                                             |         |             |
| onChange       | `ChangeEventHandler<T, Element> \| undefined`                     |         |             |
| disabled       | `{ true: string; }`                                               |         |             |
| size           | `{ xs: string; sm: string; md: string; lg: string; xl: string; }` | `md`    |             |
| weight         | `{ regular: string; medium: string; }`                            |         |             |
| data-testid    | `string \| undefined`                                             |         |             |
| asChild        | `boolean \| undefined`                                            |         |             |

### EmptyStateMessage

| Prop           | Type                                                 | Default | Description |
| -------------- | ---------------------------------------------------- | ------- | ----------- |
| defaultChecked | `boolean \| undefined`                               |         |             |
| defaultValue   | `string \| number \| readonly string[] \| undefined` |         |             |
| autoFocus      | `boolean \| undefined`                               |         |             |
| id             | `string \| undefined`                                |         |             |
| tabIndex       | `number \| undefined`                                |         |             |
| title          | `string \| undefined`                                |         |             |
| rel            | `string \| undefined`                                |         |             |
| onChange       | `ChangeEventHandler<T, Element> \| undefined`        |         |             |

### EmptyStateTitle

| Prop           | Type                                                 | Default | Description |
| -------------- | ---------------------------------------------------- | ------- | ----------- |
| defaultChecked | `boolean \| undefined`                               |         |             |
| defaultValue   | `string \| number \| readonly string[] \| undefined` |         |             |
| autoFocus      | `boolean \| undefined`                               |         |             |
| id             | `string \| undefined`                                |         |             |
| tabIndex       | `number \| undefined`                                |         |             |
| title          | `string \| undefined`                                |         |             |
| rel            | `string \| undefined`                                |         |             |
| onChange       | `ChangeEventHandler<T, Element> \| undefined`        |         |             |

## Explorer

