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

# mds-radial-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-radial-progress>` web component renders a circular progress indicator that visualizes a completion ratio as a ring with a numeric percentage at its center. It is the radial counterpart of the linear bar exposed by `<mds-progress>`, which composes it internally, and it has no native HTML primitive equivalent.

#### Semantic Behavior

- **Progress semantics**: Exposed to assistive technology as a progress widget.
- **Value clamping**: `progress` is interpreted as a 0 - 1 ratio and clamped to that range, so out-of-bounds values never overflow the ring or the displayed percentage.
- **Centered readout**: The clamped ratio is shown as a whole-number percentage at the ring's center.
- **Animated fill**: Changing `progress` at runtime animates the ring toward the new value (~500ms).
- **Reduced motion**: When reduced motion is in effect (the Magma animation preference set to `reduce`, or the OS `prefers-reduced-motion: reduce` while the preference follows the system), the ring jumps directly to the target value with no tween.
- **Icon prop**: Setting `icon` renders an icon above the percentage; the component has no slots.

#### Properties & Visual Configurations

- **`progress`** is the single source of truth for the indicator, expressed as a fraction between `0` and `1` (e.g. `0.42` shows "42"). It is the value to bind for live updates.

The shared `variant` ladder is defined in [`agents/variants.md`](../../../../agents/variants.md). On this component `variant` selects the ring color and is the only way to express status: pick a brand value (`'primary'`, `'ai'`) for neutral progress, or a status value (`'success'`, `'warning'`, `'error'`, `'info'`) to color the completion state. There is no separate `tone` prop.

#### Other behavioral props

- **`icon`** is an SVG filename slug from the Magma icon library; when present it is shown alongside the centered percentage rather than replacing it.
- **`typography`** controls the type token of the centered percentage text, restricted to the technical scale (`'option'` by default, or `'label'`) so the readout stays sized for the ring.

## 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-radial-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 |
| --- | --- | --- | --- | --- |
| `icon` | `icon` | `string \| undefined` | - | Specifies if the component should display an icon |
| `progress` | `progress` | `number` | `0` | A value between 0 and 1 that rapresents the status progress |
| `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 |
| --- | --- |
| `icon` | Selects the icon of the radial progress. |
| `value-container` | Selects the value container of the radial progress. |

## CSS custom properties

| Property | Description |
| --- | --- |
| `--mds-radial-progress-background` | Color of the ring track, behind the progress arc |
| `--mds-radial-progress-color` | Color of the progress arc and of the icon |
| `--mds-radial-progress-text-suffix` | Text written after the value, as a CSS string (`'%'` by default) |

Only these are public. Its other 2 are internal: they may change in any release, do not set them.

## Dependencies

Uses: `mds-icon`, `mds-text`.
Used by: `mds-progress`.
