# ErrorState

A failure surface that names the problem and lets the user try again.

- Family: Status, imported from `mizu-ui` or `mizu-ui/status`
- Docs: https://mizu.user64bit.world/components/error-state
- Source: https://github.com/0xuser64bit/mizu/blob/main/packages/mizu/src/status/Feedback.tsx

## Usage

```tsx
"use client";

import { useState } from "react";
import { ErrorState } from "mizu-ui";

export function Example() {
  const [retried, setRetried] = useState(false);
  return retried ? (
    <p>Retry requested.</p>
  ) : (
    <ErrorState title="Could not load artwork" onRetry={() => setRetried(true)}>
      Check your connection and try again.
    </ErrorState>
  );
}
```

## Copy it with the shadcn CLI

```sh
npx shadcn@latest init 0xuser64bit/mizu/preset # once, where there is no components.json
npx shadcn@latest add 0xuser64bit/mizu/error-state
```

## Props

- `title`: `string`. Specific problem heading.
- `onRetry`: `() => void`. Requests a retry; own the data state outside the component.

## Accessibility

Error content is announced. Retry is a native button and does not clear unrelated content.

## Motion

CSS transitions explain state changes. Reduced motion removes travel.
