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

# mds-benchmark-bar

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

The `<mds-benchmark-bar>` web component is a read-only data-visualization element of the Magma Design System that pairs a labelled caption with a horizontal progress bar to express a single benchmark value on a 0-100 scale. It is a presentational compound that composes `<mds-text>` and `<mds-progress>`; it has no native HTML primitive equivalent.

#### Semantic Behavior

- **Display-only**: The component is non-interactive - it emits no events, has no form association, and is not part of the tab sequence.
- **Text-only label**: The label caption is meant to carry a plain text string, not markup; the `label` prop is the supported source of that text.
- **Deprecated default slot**: Slotted text is still read as a legacy fallback, but only when `label` is empty - once `label` is set it always wins. HTML elements or components in the slot are unsupported.
- **Shadow part**: The inner progress bar is exposed as the `progress-bar` part for external styling.

#### Properties & Visual Configurations

- **`value`** drives the rendered value text, the value screen readers announce (the same text) and the fill of the progress bar; supply it on a 0-100 scale.
- **`alias`** overrides how the value is displayed: when present it replaces the numeric `value` in the caption (and in the announced value), letting you show formatted or qualitative text (e.g. a graded label) instead of the raw number.
- **`typography`** selects the text scale applied to both the label and value captions, choosing between `'label'` (the default, larger caption) and `'option'` (smaller, for compact contexts).

The shared `variant` and `size` ladders are defined in [`agents/variants.md`](../../../../agents/variants.md); `variant` sets the progress bar theme colors (defaulting to `'dark'`), and `size` controls the progress bar height (defaulting to `'md'`). This component does not add values beyond the shared sets.

## 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-benchmark-bar--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 |
| --- | --- | --- | --- | --- |
| `alias` | `alias` | `string \| undefined` | - | An alias to custom how value is represented |
| `label` | `label` | `string \| undefined` | - | The label of the benchmark bar |
| `size` | `size` | `"lg" \| "md" \| "sm" \| "xl" \| undefined` | `'md'` | Sets the size of the component |
| `typography` | `typography` | `"label" \| "option" \| undefined` | `'label'` | The typography of the component |
| `value` | `value` | `number` | `0` | A value between 0 and 100 that rapresents the benchmark |
| `variant` | `variant` | `"ai" \| "dark" \| "error" \| "info" \| "light" \| "primary" \| "success" \| "warning" \| undefined` | `'dark'` | Sets the theme variant colors |

## Slots

| Slot | Description |
| --- | --- |
| (default) | **Deprecated**, use the `label` property instead. Add `text string` to this slot, **avoid** to add `HTML elements` or `components` here. |

## Parts

| Part | Description |
| --- | --- |
| `progress-bar` | The progress bar element |

## Dependencies

Uses: `mds-text`, `mds-progress`.
