# Not Found Page

> A full-page 404 for a product site. Large digits drift with the pointer above a trace that drops out, and a kind line echoes the missing path. Below: "Did you mean" links ranked by edit distance with the corrected characters marked, search (callback or ?q= link), Go home and a hydration-safe Go back, popular destinations and a broken-link report.

- Slug: `not-found-page`
- Category: [Empty states](https://www.assembli.design/category/empty-states.md)
- Type: block
- Tags: 404, not-found, error-page, search, suggestions, navigation, animated
- npm dependencies: motion, lucide-react
- shadcn/ui dependencies: none
- Live preview: https://www.assembli.design/preview/not-found-page
- Page: https://www.assembli.design/components/not-found-page

![Not Found Page preview](https://www.assembli.design/thumbnails/not-found-page-light.png)

## Props

Other props pass through to the root element.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `path` | `string` |  | The path that wasn't found. Defaults to the current location once the page has loaded. |
| `code` | `string` | `"404"` | The status shown in the large digits. |
| `title` | `React.ReactNode` | `"Page not found"` |  |
| `description` | `React.ReactNode` |  | Replaces the default line, which echoes `path`. |
| `pages` | `NotFoundPageLink[]` | `[]` | Known pages. The closest ones to `path` by edit distance become "Did you mean" links. |
| `destinations` | `NotFoundDestination[]` | `DEFAULT_DESTINATIONS` | Up to four cards under the search. Pass `[]` to hide them. |
| `homeHref` | `string` | `"/"` |  |
| `searchHref` | `string` | `"/search"` | Where search goes when there's no `onSearch`: `${searchHref}?q=…`. |
| `onSearch` | `(query: string) => void \| Promise<void>` |  | Takes over search. Return a promise to show a pending state on the button. |
| `onReport` | `(path: string) => void \| Promise<void>` |  | Called by "Report a broken link". Without it the link opens a mail to `reportEmail`. |
| `reportEmail` | `string` | `"support@example.com"` |  |

## Install

One-time setup (needs a subscription):

1. Add the registry to the project's `components.json`: `{"@assembli":{"url":"https://www.assembli.design/r/{name}.json","headers":{"Authorization":"Bearer ${ASSEMBLI_API_KEY}"}}}` (merge into `"registries"`).
2. Put an API key from https://www.assembli.design/account in `.env.local` as `ASSEMBLI_API_KEY=asm_…`.

Then install with the shadcn CLI (writes `components/not-found-page/not-found-page.tsx` and installs dependencies):

```bash
npx shadcn@latest add @assembli/not-found-page
```

Registry item JSON: https://www.assembli.design/r/not-found-page.json (send `Authorization: Bearer <api key>`)

## Code

> Component source needs an Assembli subscription ($12/month or $96/year) and an API key sent as `Authorization: Bearer <key>`. To get one without copying anything, POST https://www.assembli.design/api/agent/login (or call the MCP tool connect_account), show the user the link it returns, and poll https://www.assembli.design/api/agent/token for the key. Or subscribe at https://www.assembli.design/pricing and create a key at https://www.assembli.design/account.
