{
  "_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": "Toast",
  "description": "Initializes a toast container",
  "structure": {
    "name": "root",
    "restrict": [
      "div"
    ],
    "description": "Initializes a toast container",
    "attributes": {
      "static": {
        "role": "status"
      }
    },
    "children": [
      {
        "name": "container",
        "restrict": [
          "div"
        ],
        "description": "Notification container wrapper that positions one or more toast/notification instances",
        "children": [
          {
            "name": "liveRegion",
            "restrict": [
              "div"
            ],
            "description": "Assistive live region that announces the toast to screen readers",
            "attributes": {
              "static": {
                "aria-live": "assertive",
                "aria-atomic": "true"
              }
            },
            "slot": {
              "name": "liveRegion"
            }
          },
          {
            "name": "notification",
            "restrict": [
              "section"
            ],
            "description": "Individual toast/notification surface. Each instance carries aria-labelledby pointing at the heading id and aria-describedby pointing at the body id.",
            "attributes": {
              "static": {
                "role": "dialog"
              }
            },
            "children": [
              {
                "name": "notificationBody",
                "restrict": [
                  "div"
                ],
                "description": "Body wrapper inside the notification surface",
                "children": [
                  {
                    "name": "notificationTarget",
                    "restrict": [
                      "a",
                      "div"
                    ],
                    "description": "Primary interactive surface (link) holding icon + content",
                    "children": [
                      {
                        "name": "icon",
                        "restrict": [
                          "span"
                        ],
                        "description": "Icon container (figure side of the media object)",
                        "renderWhen": "slotFilled",
                        "slot": {
                          "name": "icon",
                          "restrict": [
                            "Icon"
                          ]
                        },
                        "children": [
                          {
                            "name": "iconSvg",
                            "description": "Icon SVG element",
                            "component": "PrimitiveIcon"
                          },
                          {
                            "name": "iconAssistiveText",
                            "restrict": [
                              "span"
                            ],
                            "description": "Assistive text describing the icon",
                            "slot": {
                              "name": "iconAssistiveText"
                            }
                          }
                        ]
                      },
                      {
                        "name": "content",
                        "restrict": [
                          "div"
                        ],
                        "description": "Toast content (body side of the media object)",
                        "children": [
                          {
                            "name": "heading",
                            "restrict": [
                              "h2"
                            ],
                            "description": "Toast heading",
                            "slot": {
                              "name": "heading"
                            },
                            "children": [
                              {
                                "name": "headingAssistiveText",
                                "restrict": [
                                  "span"
                                ],
                                "description": "Assistive prefix announced before the visible heading text",
                                "slot": {
                                  "name": "headingAssistiveText"
                                }
                              }
                            ]
                          },
                          {
                            "name": "message",
                            "restrict": [
                              "p"
                            ],
                            "description": "Toast message",
                            "slot": {
                              "name": "default"
                            }
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "close",
                    "restrict": [
                      "button"
                    ],
                    "description": "Dismiss button",
                    "renderWhen": "slotFilled",
                    "children": [
                      {
                        "name": "closeIcon",
                        "description": "Close icon SVG",
                        "component": "PrimitiveIcon"
                      },
                      {
                        "name": "closeAssistiveText",
                        "restrict": [
                          "span"
                        ],
                        "description": "Assistive label for the dismiss button",
                        "slot": {
                          "name": "closeAssistiveText"
                        }
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "name": "assistiveText",
            "restrict": [
              "span"
            ],
            "description": "Generic assistive text region for non-live announcements",
            "slot": {
              "name": "assistiveText"
            }
          }
        ]
      }
    ]
  },
  "states": [
    {
      "name": "visible",
      "type": "boolean",
      "description": "Whether the toast is visible"
    }
  ],
  "accessibility": {
    "requirements": [
      {
        "id": "role-status",
        "description": "Toast should have role='status' or role='alert' for important messages"
      },
      {
        "id": "auto-dismiss",
        "description": "If toast auto-dismisses, provide enough time for users to read (at least 5 seconds)"
      },
      {
        "id": "dialog-labelling",
        "description": "Each notification section uses role='dialog' with aria-labelledby pointing to the heading id and aria-describedby pointing to the body id"
      },
      {
        "id": "live-region",
        "description": "An assistive-only live region (aria-live='assertive', aria-atomic='true') announces the notification on appearance"
      }
    ]
  },
  "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"
        }
      }
    }
  }
}
