# `LedgerUI.Components.Progress`
[🔗](https://github.com/devaction-labs/ledger_ui/blob/v0.2.0/lib/ledger_ui/components/progress.ex#L1)

Progress bar (`progress/1`) and the stacked bar of parts of a total (`progress_stack/1`).

    <.progress value={64} color="primary" />
    <.progress value={92} size="xl" label="92%" />
    <.progress indeterminate color="info" />
    <.progress_stack label="Sales by channel">
      <:segment value={46} label="Counter" />
      <:segment value={33} label="Online" />
    </.progress_stack>

`variant` and `size` default to the solid, medium bar without emitting a class (`nil`), so only
an explicit value adds `v-*`/`s-*`. `label` is the accessible name (`role="progressbar"`, with
`aria-valuenow`); with `size="xl"` it is drawn inside the bar instead.

# `progress`

## Attributes

* `value` (`:any`) - A number between 0 and `max`. Defaults to `0`.
* `max` (`:any`) - Defaults to `100`.
* `color` (`:string`) - Defaults to `"neutral"`. Must be one of `"neutral"`, `"primary"`, `"secondary"`, `"info"`, `"success"`, `"warning"`, `"error"`, or `"white"`.
* `variant` (`:string`) - Defaults to `nil`.Must be one of `nil`, `"solid"`, `"soft"`, or `"gradient"`.
* `size` (`:string`) - Defaults to `nil`.Must be one of `nil`, `"sm"`, `"md"`, `"lg"`, or `"xl"`.
* `height` (`:string`) - Defaults to `nil`.Must be one of `nil`, `""`, `"1"`, `"1.5"`, `"2"`, `"3"`, or `"4"`.
* `active` (`:boolean`) - Defaults to `false`.
* `indeterminate` (`:boolean`) - Defaults to `false`.
* `shine` (`:boolean`) - Defaults to `false`.
* `label` (`:string`) - Defaults to `nil`.
* `class` (`:any`) - Defaults to `nil`.
* `bar_class` (`:any`) - Defaults to `nil`.
* Global attributes are accepted.

# `progress_bar`

Same as `progress/1` (same attributes and slots), under the name the design vitrine uses.
## Attributes

* `value` (`:any`) - A number between 0 and `max`. Defaults to `0`.
* `max` (`:any`) - Defaults to `100`.
* `color` (`:string`) - Defaults to `"neutral"`. Must be one of `"neutral"`, `"primary"`, `"secondary"`, `"info"`, `"success"`, `"warning"`, `"error"`, or `"white"`.
* `variant` (`:string`) - Defaults to `nil`.Must be one of `nil`, `"solid"`, `"soft"`, or `"gradient"`.
* `size` (`:string`) - Defaults to `nil`.Must be one of `nil`, `"sm"`, `"md"`, `"lg"`, or `"xl"`.
* `height` (`:string`) - Defaults to `nil`.Must be one of `nil`, `""`, `"1"`, `"1.5"`, `"2"`, `"3"`, or `"4"`.
* `active` (`:boolean`) - Defaults to `false`.
* `indeterminate` (`:boolean`) - Defaults to `false`.
* `shine` (`:boolean`) - Defaults to `false`.
* `label` (`:string`) - Defaults to `nil`.
* `class` (`:any`) - Defaults to `nil`.
* `bar_class` (`:any`) - Defaults to `nil`.
* Global attributes are accepted.

# `progress_stack`

## Attributes

* `max` (`:any`) - Defaults to `100`.
* `label` (`:string`) - Defaults to `nil`.
* `class` (`:any`) - Defaults to `nil`.
* Global attributes are accepted.
## Slots

* `segment` (required) - Accepts attributes:

  * `value` (`:any`)
  * `color` (`:string`)
  * `label` (`:string`)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
