# <progress-bar>

A horizontal bar that fills to show progress, from value out of max.

Category: Display. Also written `<progress>`.

```ham
<column style="gap-8 w-full">
    <row style="w-full justify-between">
        <text style="font-bold">Project Hail Mary</text>
        <text style="muted">64%</text>
    </row>
    <progress-bar value="64"
                  max="100"
                  height="8"
                  radius="4"
                  color="teal-600"/>
</column>
```

How Hype Apps draws it on a phone: [light](https://hypeapps.dev/img/tags/progress-bar-light.webp), [dark](https://hypeapps.dev/img/tags/progress-bar-dark.webp).

## Attributes

| Name | What it does | Default |
|---|---|---|
| `background-color` | Track color; light:/dark: alternatives pick by theme (background-color="light:gray-200 dark:gray-800") | `gray-200` |
| `color` | Bar color; light:/dark: alternatives pick by theme (color="light:teal-600 dark:teal-300") |  |
| `height` | Bar height | `4` |
| `max` | The value that means full, as in HTML <progress>: value="40" max="100" fills 40%. | `1` |
| `radius` | Border radius | `2` |
| `value` | Progress 0.0-1.0 (null = indeterminate) |  |

Any tag also takes gestures: `@on.tap`, `@on.longpress`, `@on.doubletap` and `@on.swipeleft` (and right, up and down). `@click` runs on a tap too.

## Guides and recipes that use it

- [Data and databases](https://hypeapps.dev/docs/guides/data.md)
- [A poll that syncs](https://hypeapps.dev/docs/guides/sync.md)
- [Gestures](https://hypeapps.dev/docs/guides/gestures.md)

## Related tags

- [`<column>`](https://hypeapps.dev/docs/reference/column.md): Stacks its children top to bottom, with a gap between them and an alignment across.
- [`<row>`](https://hypeapps.dev/docs/reference/row.md): Lays children side by side in one line; flex= shares the free space and align/cross position them.
- [`<text>`](https://hypeapps.dev/docs/reference/text.md): A run of text; with @text it shows an expression that updates as its variables change.
- [`<ad>`](https://hypeapps.dev/docs/reference/ad.md): An ad slot in the page, filled with a banner from AdMob in a built app.
- [`<avatar>`](https://hypeapps.dev/docs/reference/avatar.md): A round avatar from a photo, initials or an icon, in any size and color.
- [`<badge>`](https://hypeapps.dev/docs/reference/badge.md): A small count or dot pinned to the corner of an icon or any other element.
- [`<canvas-tool>`](https://hypeapps.dev/docs/reference/canvas-tool.md): A drawing tool written in HAM and loaded into a draw pad as a plugin: touch handlers, state and options.
- [`<caption>`](https://hypeapps.dev/docs/reference/caption.md): A table caption, shown as a label above the table.

All tags: https://hypeapps.dev/docs/reference.md · The full reference: https://hypeapps.dev/llms.txt
