# Progress

> A bar showing how far a task has got, determinate or indeterminate.

Use a progress bar for a task that takes more than a second or two, such as an upload, or for a quota, such as seats used. For content that is loading into a layout, use a [skeleton](/docs/components/skeleton) instead.

Pro example source is available to licensed users. See [Pro access](/docs/pro/access).

## Installation

Pro components install from the Aloxe registry with the shadcn CLI. Once per project, add the registry to `components.json` and put a [registry token](/account/tokens) in the `ALOXE_TOKEN` environment variable. [Registry](/docs/pro/registry) has the details.

```json
{
  "registries": {
    "@aloxe": {
      "url": "https://<aloxe-site>/r/{name}.json",
      "headers": { "Authorization": "Bearer ${ALOXE_TOKEN}" }
    }
  }
}
```

Then add the component:

```bash
npx shadcn@latest add @aloxe/progress
```

The CLI copies the source into `components/ui/aloxe/`, so it never overwrites your own `ui` components. It also installs `@aloxe/react`, `@aloxe/tokens` and `@base-ui/react`.

Import the tokens once in your global stylesheet, after Tailwind, and add an `@source` for the copied files and one for `@aloxe/react`, so Tailwind generates their classes. `@source` paths are relative to the stylesheet; these assume `src/app/globals.css` and `src/components/ui/aloxe/`.

```css
@import "tailwindcss";
@import "@aloxe/tokens/aloxe.css";
@import "@aloxe/tokens/tailwind.css";
@source "../components/ui/aloxe";
@source "../../node_modules/@aloxe/react/dist";
```

[Installation](/docs/getting-started/installation) covers the theme and brand attributes.

## Usage

```tsx
import { Progress } from "@/components/ui/aloxe/progress";

<Progress label="Uploading brand assets" value={64} />
```

`label` is required, even when it's hidden. `value` runs from `min` (0) to `max` (100) and shows as a percentage unless you pass `format` or `valueLabel`.

## Examples

### Tones

`accent` for neutral progress, `success` when a task is complete or a value is healthy, `danger` when a quota is close to its limit.

Pro example source is available to licensed users. See [Pro access](/docs/pro/access).

### Custom value text

For quotas, set `max` and show the amount with `valueLabel`. It is visual only, so pass the same words to `getAriaValueText` for screen readers.

Pro example source is available to licensed users. See [Pro access](/docs/pro/access).

### Indeterminate and hidden labels

`value={null}` is indeterminate: no fill, a slow pulse, and no pulse with `prefers-reduced-motion`. `showLabels={false}` hides the label row when the context already says what the bar measures; the label still names it for screen readers.

Pro example source is available to licensed users. See [Pro access](/docs/pro/access).

## Accessibility

| Key | Action |
| --- | --- |
| None | The bar isn't interactive or focusable. Put any related action, such as Cancel upload, next to it. |

- `role="progressbar"` with `aria-valuenow`, `aria-valuemin`, `aria-valuemax` and `aria-valuetext`, named by `label`.
- An indeterminate bar drops `aria-valuenow`, so screen readers don't announce a made-up value.
- Tone colours repeat what the label and value already say; they never carry meaning alone.
- The fill doesn't animate when the value changes, so it never stutters on slow devices.

## API reference

Renders a `data-aloxe="progress"` attribute and a `data-tone` you can target in CSS.

**Progress** (extends Base UI Progress.Root)

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `value` | `number \| null` |  | Yes | The current value between min and max. null means indeterminate: no fill and a slow pulse. |
| `label` | `ReactNode` |  | Yes | Names the progress bar, even when showLabels is false. |
| `showLabels` | `boolean` | `true` |  | Shows the label and the value above the track. false keeps the name for screen readers only. |
| `tone` | `"accent" \| "success" \| "danger"` | `"accent"` |  | accent for neutral progress, success when complete or healthy, danger near a limit. |
| `valueLabel` | `ReactNode` |  |  | Shown instead of the percentage, such as 2 of 3 seats. Visual only: pass the same words to getAriaValueText. |
| `min` | `number` | `0` |  | The lowest value. |
| `max` | `number` | `100` |  | The highest value. |
| `format` | `Intl.NumberFormatOptions` |  |  | Formats the value text. A percentage by default. |
| `getAriaValueText` | `(formattedValue: string, value: number \| null) => string` |  |  | The text screen readers announce for the value (aria-valuetext). |
| `className` | `string` |  |  | Classes for the wrapper, such as a max width. |

## Figma

Matches the **Progress** component in the Pro Figma file. Figma `Tone` (`Accent`, `Success`, `Danger`) maps to `tone`; `Label`, `Value` and `Show labels` map to `label`, `valueLabel` and `showLabels`.

See [Figma](/docs/getting-started/figma) for where to get the file and how its names map to code.

## Pro

Progress is part of Aloxe Pro. The previews on this page are open to everyone; the Code tab shows the example source once you sign in with a Pro license. See [Access and licenses](/docs/pro/access) and [Pricing](/pricing#pro).
