{
  "_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": "ButtonIcon",
  "description": "Creates a button that looks like a plain icon.",
  "structure": {
    "name": "root",
    "restrict": [
      "button"
    ],
    "description": "Creates a button that looks like a plain icon.",
    "attributes": {
      "static": {
        "type": "button"
      },
      "bound": {
        "disabled": {
          "prop": "disabled"
        },
        "title": {
          "prop": "title"
        },
        "aria-label": {
          "prop": "alternativeText",
          "required": true
        },
        "accesskey": {
          "prop": "accessKey"
        },
        "name": {
          "prop": "name"
        },
        "value": {
          "prop": "value"
        }
      }
    },
    "children": [
      {
        "name": "icon",
        "component": "PrimitiveIcon",
        "description": "Sizing for icon that sits inside button__icon."
      },
      {
        "name": "assistiveText",
        "restrict": [
          "span"
        ],
        "description": "Screen reader text",
        "slot": {
          "name": "assistiveText"
        }
      }
    ]
  },
  "componentRefs": {
    "PrimitiveIcon": {
      "description": "Bare SVG icon composed directly inside the button. ButtonIcon supplies the SVG host class (slds-button__icon) via componentProps; PrimitiveIcon contributes the sprite-href binding.",
      "props": {
        "iconName": {
          "type": "string",
          "required": true,
          "description": "Sprite reference for the icon glyph"
        }
      }
    }
  },
  "states": [
    {
      "name": "disabled",
      "type": "boolean",
      "aria": "aria-disabled",
      "description": "Whether the button is disabled"
    },
    {
      "name": "selected",
      "type": "boolean",
      "aria": "aria-pressed",
      "description": "whether the icon button is selected/pressed"
    },
    {
      "name": "hasPopup",
      "type": "boolean",
      "aria": "aria-haspopup",
      "description": "whether the button triggers a popup"
    },
    {
      "name": "expanded",
      "type": "boolean",
      "aria": "aria-expanded",
      "description": "whether the popup the button triggers is currently open"
    }
  ],
  "accessibility": {
    "requirements": [
      {
        "id": "accessible-label",
        "description": "Icon buttons must have aria-label or title for screen readers"
      }
    ]
  }
}
