# Not Found Breakout

> A small brick game for a page-not-found screen, with bricks that spell 404.

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

export default function NotFoundBreakoutDemo() {
  return (
    <div style={{ width: '100%', maxWidth: 480 }}>
      <NotFoundBreakout />
    </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, NotFoundBreakout } from '@brand-studio/ui';
import brand from './brand.json';

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

## Usage

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

```tsx
<NotFound title="This page is not here" art={<NotFoundBreakout />} />
```

Space, a click or a tap launches the ball. The paddle follows the pointer or the left and right arrow keys. The bricks take the brand's ink and the paddle and ball its accent, and both change with the theme.

## Accessibility

- The game never starts by itself and pauses when the tab is hidden.
- The canvas takes keyboard focus, and a status line below it says how many bricks are left and what to press.
- Keep the way out of the page above the game, so nobody has to play to leave.

## API Reference

| Prop | Type | Default |
|---|---|---|
| `label?` | `string` | `'Brick game. Press Space to launch, and the left and right arrows to move.'` |
| `className?` | `string` | `''` |

Source: https://brandstudio.js.org/docs/components/not-found-breakout/
