Skip to content
Back to skills

Takeoff Empty State

ASecurity

Use `EmptyState` where a list, table or search has nothing to show. It is a standalone Takeoff component rather than a Spar primitive: a centred column of an illustration, a title, a description and actions, with no state and no keyboard behavior. **When to use:** Empty lists, searches with no results, a first-run screen, a table's `emptyState`. Not this — use `takeoff-alert` for a message about something that went wrong, and `takeoff-skeleton` / `takeoff-spinner` while data is still loading.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added December 4, 2026
designreact

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add turkishtechnology/takeoff-v2 --skill takeoff-empty-state --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Takeoff Empty State?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Takeoff Empty State
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/turkishtechnology-takeoff-empty-state/badge)](https://www.skillsdirectory.com/skills/turkishtechnology-takeoff-empty-state)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: takeoff-empty-state
description:
  Use the EmptyState component from @takeoff-ui/react-spar to show the block
  where content is missing — an illustration, a title, a description and actions
  — in five surfaces (basic, light, divided, dark, primary) and two sizes. Use
  whenever building, importing, styling, or fixing an empty state, "no results"
  / "no data" / "nothing here yet" screen, zero state, or a table or list
  placeholder in a Takeoff / Spar React app.
---

# EmptyState — @takeoff-ui/react-spar

Use `EmptyState` where a list, table or search has nothing to show. It is a
standalone Takeoff component rather than a Spar primitive: a centred column of
an illustration, a title, a description and actions, with no state and no
keyboard behavior.

**When to use:** Empty lists, searches with no results, a first-run screen, a
table's `emptyState`. Not this — use `takeoff-alert` for a message about
something that went wrong, and `takeoff-skeleton` / `takeoff-spinner` while data
is still loading.

## Quick start

```tsx
import { Button, EmptyState } from '@takeoff-ui/react-spar';

<EmptyState>
  <EmptyState.Icon>
    <img src={noResultIllustration} alt="" />
  </EmptyState.Icon>
  <EmptyState.Title as="h3">No flights found</EmptyState.Title>
  <EmptyState.Description>
    Try other dates or a nearby airport to see more results.
  </EmptyState.Description>
  <EmptyState.Actions>
    <Button variant="neutral" appearance="outlined">
      Clear filters
    </Button>
    <Button variant="info">Change dates</Button>
    <Button variant="info" appearance="text">
      Learn more
    </Button>
  </EmptyState.Actions>
</EmptyState>;
```

## Anatomy

```tsx
<EmptyState>
  <EmptyState.Icon />
  <EmptyState.Title />
  <EmptyState.Description />
  <EmptyState.Actions />
</EmptyState>
```

Every part is optional. The recipe lays them out in this order whatever order
they are written in, and closes the gap of a part that is left out.

## Common patterns

```tsx
// A card surface, compact.
<EmptyState type="divided" size="small">…</EmptyState>

// Inverted surfaces: pick white Buttons.
<EmptyState type="dark">
  …
  <EmptyState.Actions>
    <Button variant="white">Refresh</Button>
  </EmptyState.Actions>
</EmptyState>

// Inside a Table.
<Table data={[]} columns={columns} emptyState={<EmptyState size="small">…</EmptyState>} />

// A plain icon instead of an illustration — give it its own size.
<EmptyState.Icon>
  <SearchIconOutlinedRounded style={{ width: 48, height: 48 }} />
</EmptyState.Icon>

// Results swapped in place: announce the change.
<EmptyState role="status">…</EmptyState>
```

## Key props

| Prop          | Part              | Type                                                     | Default                             | Notes                                                                       |
| ------------- | ----------------- | -------------------------------------------------------- | ----------------------------------- | --------------------------------------------------------------------------- |
| `type`        | `EmptyState`      | `'basic' \| 'light' \| 'divided' \| 'dark' \| 'primary'` | `'basic'`                           | Surface. `dark` / `primary` invert the text; use `variant="white"` Buttons. |
| `size`        | `EmptyState`      | `'small' \| 'base'`                                      | `'base'`                            | Illustration 96 / 128px, typography and spacing. Match the Buttons' size.   |
| `aria-hidden` | `EmptyState.Icon` | `boolean`                                                | `true`                              | Set `false` for an informative image with its own `alt`.                    |
| `as`          | every part        | `ElementType`                                            | `div` / `div` / `div` / `p` / `div` | `EmptyState.Title as="h2"` puts the title in the heading outline.           |
| `classNames`  | every part        | `Partial<Record<'root', string>>`                        | —                                   | Extra classes on the part.                                                  |
| `slotProps`   | every part        | `SlotPropsMap<'root'>`                                   | —                                   | Per-slot HTML attributes and styles.                                        |

## Illustrations

Not bundled. The Takeoff Figma library has an `empty-state-illustrations` set
(26 scenes in `gray`, `info` and `primary`, at 128px and 96px): export the one
you need and pass it as an `svg` or `img` child of `EmptyState.Icon`, which it
fills. Figma pairs `gray` with `basic` / `light` / `divided`, `info` with `dark`
and `primary` with `primary`.

## Accessibility

- The root has no role; add `role="status"` when the block replaces results in
  place.
- `EmptyState.Title` is a `div` by default — use `as` for a heading level that
  fits the page.
- `EmptyState.Icon` is `aria-hidden`: the title, not the picture, carries the
  message.

Read `references/full-docs.md` for all props, examples, slots, data attributes,
and type definitions.

## Source

- Docs: `apps/docs/docs/components/empty-state.mdx`
- Component: `packages/react-spar/src/components/empty-state/`

Files in this skill

  • SKILL.md5.1 KB
  • references/full-docs.md10.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in design →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.