{
  "_copyright": "Copyright (c) 2026, Salesforce, Inc., All rights reserved. For full license text, see the LICENSE.txt file",
  "$schema": "https://slds.lightningdesignsystem.com/schemas/uif-foundation.v1.json",
  "apiVersion": "1.0.0",
  "name": "Slider",
  "description": "Initializes slider component",
  "structure": {
    "name": "root",
    "restrict": [
      "div"
    ],
    "description": "Initializes slider component",
    "children": [
      {
        "name": "label",
        "restrict": [
          "label"
        ],
        "description": "Form element label associated with the range input",
        "attributes": {
          "bound": {
            "for": {
              "prop": "inputId",
              "required": true
            }
          }
        },
        "children": [
          {
            "name": "sliderLabel",
            "restrict": [
              "span"
            ],
            "description": "Wrapper that pairs the slider's text label with its current range",
            "children": [
              {
                "name": "labelText",
                "restrict": [
                  "span"
                ],
                "description": "Human-readable slider label text",
                "slot": {
                  "name": "label",
                  "required": true
                }
              },
              {
                "name": "labelRange",
                "restrict": [
                  "span"
                ],
                "description": "Min/max range descriptor (e.g. '0 - 100')",
                "slot": {
                  "name": "range"
                }
              }
            ]
          }
        ]
      },
      {
        "name": "sliderContainer",
        "restrict": [
          "div"
        ],
        "description": "Form-element control wrapper for the slider input and any validation message",
        "children": [
          {
            "name": "slider",
            "restrict": [
              "div"
            ],
            "description": "Slider track wrapper that owns size and orientation modifiers",
            "children": [
              {
                "name": "input",
                "restrict": [
                  "input"
                ],
                "description": "Native range input",
                "attributes": {
                  "static": {
                    "type": "range"
                  },
                  "bound": {
                    "id": {
                      "prop": "inputId",
                      "required": true
                    },
                    "name": {
                      "prop": "name"
                    },
                    "value": {
                      "prop": "value"
                    },
                    "min": {
                      "prop": "min"
                    },
                    "max": {
                      "prop": "max"
                    },
                    "step": {
                      "prop": "step"
                    },
                    "disabled": {
                      "prop": "disabled"
                    },
                    "aria-describedby": {
                      "prop": "ariaDescribedBy"
                    }
                  }
                }
              },
              {
                "name": "value",
                "restrict": [
                  "span"
                ],
                "description": "Current value display, decorative for screen readers",
                "attributes": {
                  "static": {
                    "aria-hidden": "true"
                  }
                },
                "slot": {
                  "name": "value"
                }
              }
            ]
          },
          {
            "name": "errorMessage",
            "restrict": [
              "div"
            ],
            "description": "Validation error message",
            "renderWhen": {
              "prop": "hasError",
              "eq": "true"
            },
            "attributes": {
              "bound": {
                "id": {
                  "prop": "errorMessageId"
                }
              }
            },
            "slot": {
              "name": "errorMessage"
            }
          }
        ]
      }
    ]
  },
  "states": [
    {
      "name": "disabled",
      "type": "boolean",
      "aria": "aria-disabled",
      "description": "Whether the slider is disabled"
    },
    {
      "name": "hasError",
      "type": "boolean",
      "description": "Whether the slider has a validation error"
    },
    {
      "name": "required",
      "type": "boolean",
      "aria": "aria-required",
      "description": "Whether the slider value is required"
    }
  ],
  "accessibility": {
    "requirements": [
      {
        "id": "label-association",
        "description": "Slider must have an associated label referenced via the input's id"
      },
      {
        "id": "value-announcement",
        "description": "Current value should be announced when changed; the visible value display is aria-hidden because the native range input already exposes the value to assistive tech"
      },
      {
        "id": "error-association",
        "description": "When an error message is present, the input should reference it via aria-describedby"
      }
    ]
  }
}
