{
  "_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": "Tooltip",
  "description": "Initializes a tooltip",
  "structure": {
    "name": "root",
    "restrict": [
      "div",
      "span"
    ],
    "description": "Initializes a tooltip",
    "attributes": {
      "static": {
        "role": "tooltip"
      },
      "bound": {
        "id": {
          "prop": "tooltipId",
          "required": true
        }
      }
    },
    "children": [
      {
        "name": "trigger",
        "restrict": [
          "button",
          "a",
          "span"
        ],
        "description": "element that triggers tooltip display",
        "attributes": {
          "static": {
            "aria-disabled": "true"
          },
          "bound": {
            "aria-describedby": {
              "prop": "tooltipId"
            }
          }
        },
        "children": [
          {
            "name": "triggerIcon",
            "description": "Decorative icon inside a button-icon trigger",
            "component": "PrimitiveIcon"
          },
          {
            "name": "triggerIconContainer",
            "restrict": [
              "span"
            ],
            "description": "Wrapper around an icon-only trigger (e.g. link trigger) that conveys icon container semantics",
            "children": [
              {
                "name": "triggerIconContainerSvg",
                "description": "SVG glyph for the icon-container trigger",
                "component": "PrimitiveIcon"
              },
              {
                "name": "triggerIconContainerAssistiveText",
                "restrict": [
                  "span"
                ],
                "description": "Visually hidden accessible label for the icon-container trigger"
              }
            ]
          },
          {
            "name": "triggerAssistiveText",
            "restrict": [
              "span"
            ],
            "description": "Visually hidden accessible label paired with a button-icon trigger"
          }
        ]
      },
      {
        "name": "content",
        "restrict": [
          "div"
        ],
        "description": "Tooltip content",
        "slot": {
          "name": "default",
          "required": true
        },
        "children": [
          {
            "name": "contentHelper",
            "restrict": [
              "div"
            ],
            "description": "Optional decorative helper block inside the tooltip body, hidden from assistive technologies",
            "attributes": {
              "static": {
                "aria-hidden": "true"
              }
            },
            "children": [
              {
                "name": "contentHelperIconContainer",
                "restrict": [
                  "span"
                ],
                "description": "Inline icon container nested in the helper text",
                "children": [
                  {
                    "name": "contentHelperIconSvg",
                    "description": "SVG glyph for the helper icon",
                    "component": "PrimitiveIcon"
                  },
                  {
                    "name": "contentHelperAssistiveText",
                    "restrict": [
                      "span"
                    ],
                    "description": "Visually hidden accessible label for the helper icon"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "states": [
    {
      "name": "open",
      "type": "boolean",
      "aria": "aria-expanded",
      "description": "Whether the tooltip is visible"
    }
  ],
  "accessibility": {
    "requirements": [
      {
        "id": "tooltip-role",
        "description": "Tooltip must have role='tooltip'"
      },
      {
        "id": "aria-describedby",
        "description": "Triggering element must have aria-describedby pointing to tooltip id"
      },
      {
        "id": "keyboard-accessible",
        "description": "Tooltip must be accessible via keyboard focus, not just hover"
      },
      {
        "id": "decorative-icons-hidden",
        "description": "Decorative icons inside the trigger and tooltip body must set aria-hidden='true'"
      }
    ]
  },
  "componentRefs": {
    "PrimitiveIcon": {
      "description": "Bare SVG icon composed directly inside the component. The host node supplies the SVG class (e.g. slds-button__icon, slds-menu__item-icon) via componentProps; PrimitiveIcon contributes the sprite-href binding.",
      "props": {
        "iconName": {
          "type": "string",
          "required": true,
          "description": "Sprite reference for the icon glyph"
        }
      }
    }
  }
}
