<!--
  GENERATED FILE - do not edit by hand.
  Source of truth: src/components/mds-progress/ in the magma monorepo (usage/*.md and the
  component's JSDoc). Regenerated on every stencil build (scripts/component-docs.ts).
-->

# mds-progress

> `@maggioli-design-system/magma` 2.15.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.

The `<mds-progress>` web component is the progress indicator of the Magma Design System, rendering the completion state of a determinate task as a bar or ring. It is the system equivalent of the native HTML `<progress>` element, exposing the appropriate progressbar role and ARIA value attributes natively.

#### Semantic Behavior

- **Spoken step text**: As `progress` changes, the component maps the value onto the `steps` list and announces the matching label, so assistive technologies report a human-readable milestone rather than a raw number.
- **Decorative opt-out**: While the host carries `aria-hidden="true"`, all progressbar semantics are stripped so the indicator can be used as purely decorative chrome; removing it later restores them.
- **Range**: A `progress` outside 0-1 reads as its nearest end, for the fill and for `aria-valuenow` / `aria-valuetext`. An `aria-valuetext` set on the host replaces the step and stays.
- **Radial delegation**: With `direction="radial"` the rendering is delegated to `mds-radial-progress`, which carries the typography and the textual percentage; the bar directions render a single fill instead.

#### Properties & Visual Configurations

- **`progress`** is the source of truth: a fractional value between `0` and `1` (not a percentage) that drives both the visual fill and the computed ARIA value.
- **`steps`** is a comma-separated string of milestone labels (default Italian: `'Inizio,Un quarto,Metà,Tre quarti,Fine'`); the current `progress` is quantized across these labels to pick what screen readers announce. Provide labels that match the granularity of the task.
- **`typography`** (`'option'` | `'label'`) selects the type scale applied to the textual percentage shown inside the radial variant; it has no effect on the bar directions.

#### Other behavioral props

- **`direction`** chooses the geometry: `'horizontal'` and `'vertical'` render a linear fill bar, while `'radial'` renders a circular ring with a centered percentage via `mds-radial-progress`.

`variant` takes `primary` (default), `ai`, the status values (`info`, `success`, `warning`, `error`) and the neutral `dark` / `light`, as described in [`agents/variants.md`](../../../../agents/variants.md); `size` (`sm` default, `md`, `lg`, `xl`) sets the bar thickness.

## Read next

- [`examples.md`](examples.md) - correct usage, from the most common case
- [`mistakes.md`](mistakes.md) - the wrong forms, each with the right one
- [Storybook](https://magma-design-system.github.io/magma/storybook/?path=/docs/ui-progress--docs) - the live examples, in the published Storybook of `main`
- [`conventions.md`](../../../../agents/conventions.md), [`variants.md`](../../../../agents/variants.md), [`mistakes.md`](../../../../agents/mistakes.md) - the rules shared by every component

## Props

| Prop | Attribute | Type | Default | Description |
| --- | --- | --- | --- | --- |
| `direction` | `direction` | `"horizontal" \| "radial" \| "vertical" \| undefined` | `'horizontal'` | Specifies the direction of the progress bar, if horizonatl or vertical |
| `progress` | `progress` | `number` | `0` | A value between 0 and 1 that rapresents the status progress |
| `size` | `size` | `"lg" \| "md" \| "sm" \| "xl" \| undefined` | `'sm'` | Sets the size of the component |
| `steps` | `steps` | `string` | `'Inizio,Un quarto,Metà,Tre quarti,Fine'` | Sets the steps that can be pronounced by accessibility technologies |
| `typography` | `typography` | `"label" \| "option" \| undefined` | `'option'` | The typography of the component |
| `variant` | `variant` | `"ai" \| "dark" \| "error" \| "info" \| "light" \| "primary" \| "success" \| "warning" \| undefined` | `'primary'` | Sets the theme variant colors |

## Parts

| Part | Description |
| --- | --- |
| `progress` | Selects the `div` element that contains the progress bar |
| `radial-progress` | Selects the `mds-radial-progress` element that contains the radial progress bar |

## CSS custom properties

| Property | Description |
| --- | --- |
| `--mds-progress-background` | Background color of the progress bar. |
| `--mds-progress-color` | Foreground color of the progress indicator. |
| `--mds-progress-duration` | Duration of the progress animation. |
| `--mds-progress-radius` | Border-radius of the progress bar. |
| `--mds-progress-thickness` | Thickness (height) of the progress bar. |

## Dependencies

Uses: `mds-radial-progress`.
Used by: `mds-accordion-timer-item`, `mds-benchmark-bar`, `mds-input-upload`, `mds-stepper-bar-item`.
