# Empty State

> What a list or page shows before it has content, with the action that fills it.

```tsx
import { Button, EmptyState } from '@brand-studio/ui';
import { ShoppingBag } from 'lucide-react';

export default function EmptyStateDemo() {
  return (
    <div style={{ width: '100%', maxWidth: 460 }}>
      <EmptyState
        icon={<ShoppingBag strokeWidth={1.8} />}
        title="No orders yet"
        description="Your first bag ships the Friday after you subscribe. Orders and tracking show up here."
        action={<Button>Choose a coffee</Button>}
      />
    </div>
  );
}
```

## Installation

```sh
npm install @brand-studio/ui
```

React 18 or 19 is a peer dependency. Import the stylesheet once and wrap the app in a brand theme:

```tsx
import '@brand-studio/ui/styles.css';
import { BrandTheme, EmptyState } from '@brand-studio/ui';
import brand from './brand.json';

<BrandTheme palette={brand.tokens} mode="system">
  {/* your app */}
</BrandTheme>
```

## Usage

```tsx
import { EmptyState } from '@brand-studio/ui';
```

```tsx
<EmptyState
  title="No orders yet"
  description="Your first bag ships the Friday after you subscribe."
  action={<Button>Choose a coffee</Button>}
/>
```

## Accessibility

- The title is an `<h3>`. The icon is decorative and hidden from screen readers.
- Say what will appear here and give one action that makes it appear. Skip the action when the person cannot fix the emptiness.

## API Reference

| Prop | Type | Default |
|---|---|---|
| `icon?` | `React.ReactNode` | – |
| `title` | `React.ReactNode` | – |
| `description?` | `React.ReactNode` | – |
| `action?` | `React.ReactNode` | – |
| `className?` | `string` | `''` |

Source: https://brandstudio.js.org/docs/components/empty-state/
