{
  "_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": "Alert",
  "description": "An alert is a banner that communicates a state or action to the user.",
  "structure": {
    "name": "root",
    "restrict": [
      "div"
    ],
    "description": "Alert banners communicate a state that affects the entire system, not just a feature or page. It persists over a session and appears without the user initiating the action.",
    "attributes": {
      "static": {
        "role": "alert"
      }
    },
    "children": [
      {
        "name": "assistiveText",
        "restrict": [
          "span"
        ],
        "description": "Assistive text for screen readers",
        "slot": {
          "name": "assistiveText"
        }
      },
      {
        "name": "icon",
        "restrict": [
          "span"
        ],
        "description": "Icon container",
        "renderWhen": "slotFilled",
        "slot": {
          "name": "icon",
          "restrict": [
            "Icon"
          ]
        },
        "children": [
          {
            "name": "iconSvg",
            "description": "Inline SVG element rendered inside the icon container.",
            "component": "PrimitiveIcon"
          }
        ]
      },
      {
        "name": "content",
        "restrict": [
          "h2"
        ],
        "description": "Alert message content",
        "slot": {
          "name": "default",
          "required": true
        },
        "children": [
          {
            "name": "link",
            "restrict": [
              "a"
            ],
            "description": "Optional inline action link inside the alert message.",
            "renderWhen": "slotFilled",
            "slot": {
              "name": "link"
            }
          }
        ]
      },
      {
        "name": "close",
        "restrict": [
          "div"
        ],
        "description": "Close button container",
        "renderWhen": "slotFilled",
        "slot": {
          "name": "close",
          "restrict": [
            "Button"
          ]
        },
        "children": [
          {
            "name": "closeButton",
            "restrict": [
              "button"
            ],
            "description": "Close button element.",
            "attributes": {
              "static": {
                "title": "Close"
              }
            },
            "children": [
              {
                "name": "closeButtonIcon",
                "description": "Inline SVG icon inside the close button.",
                "component": "PrimitiveIcon"
              },
              {
                "name": "closeButtonAssistiveText",
                "restrict": [
                  "span"
                ],
                "description": "Visually-hidden label for the close button."
              }
            ]
          }
        ]
      }
    ]
  },
  "states": [
    {
      "name": "dismissed",
      "type": "boolean",
      "description": "Whether the alert has been dismissed"
    }
  ],
  "accessibility": {
    "requirements": [
      {
        "id": "role-alert",
        "description": "Alert must have role='alert' to announce to screen readers"
      },
      {
        "id": "close-accessible",
        "description": "Close button must have accessible label"
      },
      {
        "id": "icon-aria-hidden",
        "description": "Decorative SVG icons 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"
        }
      }
    }
  }
}
