# Progress Bar

> The everyday progress bar on Base UI: a label with a right-aligned value that counts with the fill, an indeterminate sweep, a buffered layer, segments, three heights and four intents. Also exports StepProgress for "3 of 5 steps", UsageBar, a stacked storage meter with a legend, and ProgressCircle, a small ring for inline use.

- Slug: `progress-bar`
- Category: [Loaders](https://www.assembli.design/category/loaders.md)
- Type: component
- Tags: progress, progress-bar, meter, usage, steps, ring, loading, base-ui
- npm dependencies: @base-ui/react, motion
- shadcn/ui dependencies: none
- Live preview: https://www.assembli.design/preview/progress-bar
- Page: https://www.assembli.design/components/progress-bar

![Progress Bar preview](https://www.assembli.design/thumbnails/progress-bar-light.png)

## Props

Other props pass through to the root element.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` (required) | `number \| null` |  | The current value. `null` shows the indeterminate state. |
| `max` | `number` | `100` |  |
| `label` | `React.ReactNode` |  |  |
| `hint` | `React.ReactNode` |  | A quiet line under the bar, such as "3 of 12 files · about 2 min left". |
| `formatValue` | `((value: number, max: number) => React.ReactNode) \| null` | `(v, m) => `${Math.round(pctOf(v, m))}%`` | Formats the right-aligned value. Return `null` to hide it. Defaults to a whole percent. |
| `buffer` | `number` |  | A lighter layer ahead of the fill, such as how much of a video has buffered. |
| `segments` | `number` |  | Splits the track into this many equal segments; the fill still runs continuously through them. |
| `size` | `Size` | `"sm"` |  |
| `intent` | `Intent` | `"default"` |  |

## 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/progress-bar/progress-bar.tsx` and installs dependencies):

```bash
npx shadcn@latest add @assembli/progress-bar
```

Registry item JSON: https://www.assembli.design/r/progress-bar.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.
