# TaskProgress

Make a multi-stage operation legible, including partial completion and failure.

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

## Usage

```tsx
"use client";

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

export function Example() {
  const [cancelled, setCancelled] = useState(false);
  return (
    <TaskProgress
      label="Prepare release"
      onCancel={() => setCancelled(true)}
      steps={[
        { id: "a", label: "Validate", state: "complete" },
        {
          id: "b",
          label: "Build",
          state: cancelled ? "error" : "running",
          detail: cancelled ? "Cancelled by you" : "Compiling package",
        },
        { id: "c", label: "Publish", state: "queued" },
      ]}
    />
  );
}
```

## 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/task-progress
```

## Props

- `steps`: `TaskStep[]`. Stable id, label, state and optional detail.
- `onCancel`: `() => void`. Shown while a step is running. Consumer cancels the real task.

## Accessibility

Ordered steps expose readable states. Progress counts completed steps; error text does not rely on color.

## Motion

CSS transitions explain state changes. Reduced motion removes travel.
