# Progress

The native `<progress>`, determinate or indeterminate.

Source: https://www.zazz.sh/api/primitives/progress/

## Installation

```bash
pnpm dlx zazz-ui add progress
```

Run `zazz-ui init` first if the project has no `zazz/` folder yet.

## Examples

### Default

```html
<div data-ui="field">
  <label
    style="
      --display: flex;
      --items: center;
      --justify: space-between;
    "
    data-field-slot="label"
    for="f-upload"
  >
    <span>Reticulating splines…</span>
    <span
      style="
        --font-size: var(--font-size-xs);
        --text: var(--color-muted-foreground);
      "
      >62%</span
    >
  </label>
  <progress data-ui="progress" id="f-upload" max="100" value="62">62%</progress>
</div>
```

### Indeterminate

```html
<progress data-ui="progress" aria-label="Loading"></progress>
```

## Attributes

| Attribute | Kind | Values |
| --- | --- | --- |
| `data-ui="progress"` | identity | free value |

## Hooks

| Hook | Default | State |
| --- | --- | --- |
| `--ui-progress-bar-bg` | `var(--color-primary)` | — |
| `--ui-progress-bg` | `var(--color-muted)` | — |
| `--ui-progress-corner-shape` | `round` | — |
| `--ui-progress-h` | `calc(var(--spacing) * 1.5)` | — |
| `--ui-progress-indeterminate-duration` | `1s` | — |
| `--ui-progress-radius` | `var(--radius-full)` | — |
| `--ui-progress-track-border` | `1px solid transparent` | — |
| `--ui-progress-w` | `100%` | — |
