{
  "timestamp": "2026-11-19T09:33:56",
  "compiler": {
    "name": "@stencil/core",
    "version": "4.45.4",
    "typescriptVersion": "5.8.3"
  },
  "storybook": "https://magma-design-system.github.io/magma/storybook/",
  "studio": "https://magma-design-system.github.io/magma/studio/",
  "components": [
    {
      "filePath": "src/components/mds-input-range-value/mds-input-range-value.tsx",
      "encapsulation": "shadow",
      "tag": "mds-input-range-value",
      "docs": "One value of an `mds-input-range` that holds several, as an `<option>` is one choice of a\n`<select>`: the range draws a thumb for it, and its text names that thumb. It draws nothing\nitself. Adding or removing a value is adding or removing one of these elements: the range\nwatches its children.",
      "docsTags": [
        {
          "name": "slot",
          "text": "- The name of the value, as text (\"Minimo\", \"Massimo\"): the accessible name of its thumb.\nWithout text the thumb is named after the label of the range and its position (\"Prezzo, 1 di 2\")"
        },
        {
          "name": "parent",
          "text": "mds-input-range"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-input-range-value>` web component is one value of a [`<mds-input-range>`](../mds-input-range/AGENTS.md) that holds several values on one track, as an `<option>` is one choice of a `<select>`. The range draws a thumb for each of its `<mds-input-range-value>` children; the child itself draws nothing.\n\n#### Semantic Behavior\n\n- **Compound child only**: it works only as a direct child of `<mds-input-range>`. Outside a range it is hidden and does nothing.\n- **One child, one thumb**: adding a value is adding a child, removing one is removing its child. The range watches its children, their values and their text.\n- **The text names the thumb**: the text of the child is the accessible name of its thumb (\"Minimo\", \"Massimo\"), as each thumb of the multi-thumb slider of the WAI-ARIA APG. A child without text gets a name made of the label of the range and its position (\"Prezzo, 1 di 2\", in the language of the page).\n- **The range keeps the value valid**: it brings a value outside `min` and `max`, or off the `step`, inside the range and onto the step, as a native range input does, and writes it back here. A child without a value starts in the middle of the range.\n- **The order is the order of the values**: the thumbs follow their values from the lowest, whatever the order of the children in the markup; each keeps the name of its own child.\n- **The value follows the thumb**: as the thumb moves, the range writes its value on `value`, which is reflected. Setting `value` moves the thumb.\n\n#### Properties & Visual Configurations\n\nThe only prop is `value`, the number of the thumb. The thumb is styled by its range: the child has no `variant` / `tone` ([`agents/variants.md`](../../../../agents/variants.md)), no part and no public CSS custom property.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-input-range-value>` component, ordered from most common to most specialized. The examples assume a working knowledge of the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### An Interval: Two Values\n\nThe canonical form: a minimum and a maximum on one track. The text of the range is its label, the text of each value names its thumb.\n\n```html\n<mds-input-range min=\"0\" max=\"500\" step=\"10\" name=\"prezzo\">\n  Prezzo\n  <mds-input-range-value value=\"100\">Minimo</mds-input-range-value>\n  <mds-input-range-value value=\"400\">Massimo</mds-input-range-value>\n</mds-input-range>\n```\n\n#### A Scale of Stops\n\nMore than two values: each stops at its neighbours, which it can reach but not pass. The header lists them, separated by a middle dot.\n\n```html\n<mds-input-range min=\"1\" max=\"21\" step=\"0.5\" name=\"contrasto\">\n  Scala di contrasto\n  <mds-input-range-value value=\"3\">Passo 1</mds-input-range-value>\n  <mds-input-range-value value=\"4.5\">Passo 2</mds-input-range-value>\n  <mds-input-range-value value=\"7\">Passo 3</mds-input-range-value>\n  <mds-input-range-value value=\"12\">Passo 4</mds-input-range-value>\n</mds-input-range>\n```\n\n#### Adding and Removing a Value\n\nA value is an element: append a child to add a thumb, remove it to take the thumb away. The range emits `mdsInputRangeValuesChange` with the new list.\n\n```html\n<mds-input-range id=\"scala\" min=\"0\" max=\"100\" name=\"passi\">\n  Passi\n  <mds-input-range-value value=\"20\"></mds-input-range-value>\n  <mds-input-range-value value=\"80\"></mds-input-range-value>\n</mds-input-range>\n\n<script>\n  const scala = document.querySelector('#scala');\n  const passo = document.createElement('mds-input-range-value');\n  passo.value = 50;\n  scala.append(passo); // a third thumb at 50\n  passo.remove(); // back to two\n</script>\n```\n\n#### Reading and Setting a Value\n\n`value` follows its thumb, so the children are where the page reads the values; setting `value` moves the thumb, within its neighbours.\n\n```js\nconst [minimo, massimo] = document.querySelectorAll('#prezzo mds-input-range-value');\nconsole.log(minimo.value, massimo.value);\nmassimo.value = 300;\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-input-range-value>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Use It Outside `<mds-input-range>`\n\nA value draws nothing: only its range draws its thumb.\n\n```html\n<!-- INCORRECT -->\n<mds-input-range-value value=\"20\">Minimo</mds-input-range-value>\n\n<!-- CORRECT -->\n<mds-input-range min=\"0\" max=\"100\">\n  Prezzo\n  <mds-input-range-value value=\"20\">Minimo</mds-input-range-value>\n</mds-input-range>\n```\n\n#### Do Not Put the Label of the Range in a Value\n\nThe text of the range is its label, the text of a value names its own thumb. A value that carries the label leaves the range unnamed and names one thumb after the whole group.\n\n```html\n<!-- INCORRECT -->\n<mds-input-range>\n  <mds-input-range-value value=\"20\">Prezzo</mds-input-range-value>\n  <mds-input-range-value value=\"80\"></mds-input-range-value>\n</mds-input-range>\n\n<!-- CORRECT -->\n<mds-input-range>\n  Prezzo\n  <mds-input-range-value value=\"20\">Minimo</mds-input-range-value>\n  <mds-input-range-value value=\"80\">Massimo</mds-input-range-value>\n</mds-input-range>\n```\n\n#### Do Not Read the Values from `value` of the Range\n\nWith values, `value` and `mdsInputRangeChange` of the range are left out: they hold the one value of a range without children. Read the children, `mdsInputRangeValuesChange` or the form.\n\n```js\n// INCORRECT\nrange.addEventListener('mdsInputRangeChange', (e) => console.log(e.detail));\n\n// CORRECT\nrange.addEventListener('mdsInputRangeValuesChange', (e) => console.log(e.detail.values));\n```\n"
      },
      "props": [
        {
          "name": "value",
          "type": "number | undefined",
          "complexType": {
            "original": "number",
            "resolved": "number | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "value",
          "reflectToAttr": true,
          "docs": "The value of the thumb. The range keeps it inside its `min` and `max`, on its `step` and\nbetween the values next to it, and writes it here as the thumb moves; set it to move the\nthumb. Without a value the thumb starts in the middle of the range, as a native range input",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [],
      "slots": [
        {
          "name": "",
          "docs": "The name of the value, as text (\"Minimo\", \"Massimo\"): the accessible name of its thumb.\nWithout text the thumb is named after the label of the range and its position (\"Prezzo, 1 di 2\")"
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-forms-range-value--docs"
    }
  ]
}
