{
  "_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": "Icon",
  "description": "Icons provide visual context and enhance usability.",
  "structure": {
    "name": "root",
    "restrict": [
      "span"
    ],
    "description": "Container for icons",
    "attributes": {
      "bound": {
        "title": {
          "prop": "title"
        }
      }
    },
    "children": [
      {
        "name": "svg",
        "restrict": [
          "svg"
        ],
        "description": "SVG icon element",
        "attributes": {
          "static": {
            "aria-hidden": "true"
          },
          "bound": {
            "aria-label": {
              "prop": "assistiveText"
            }
          }
        },
        "children": [
          {
            "name": "use",
            "restrict": [
              "use"
            ],
            "description": "SVG sprite reference (xlink:href) pointing at the symbol for the requested icon",
            "attributes": {
              "bound": {
                "xlink:href": {
                  "prop": "spriteHref",
                  "required": true
                }
              }
            }
          }
        ]
      },
      {
        "name": "assistiveText",
        "restrict": [
          "span"
        ],
        "description": "Assistive text for screen readers",
        "renderWhen": "slotFilled",
        "slot": {
          "name": "assistiveText"
        }
      }
    ]
  },
  "states": [
    {
      "name": "decorative",
      "type": "boolean",
      "description": "Whether the icon is purely decorative and should be hidden from assistive technology"
    },
    {
      "name": "disabled",
      "type": "boolean",
      "description": "Whether the icon is rendered in a disabled (muted) state"
    },
    {
      "name": "flip",
      "type": "boolean",
      "description": "Whether the icon's glyph is mirrored for right-to-left locales"
    }
  ],
  "accessibility": {
    "requirements": [
      {
        "id": "decorative-hidden",
        "description": "Decorative icons should be hidden from assistive technology with aria-hidden='true'"
      },
      {
        "id": "meaningful-label",
        "description": "Meaningful icons should have assistive text that describes the icon's purpose"
      }
    ]
  }
}
