{
  "_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-system.v1.json",
  "apiVersion": "1.0.0",
  "name": "Toast",
  "description": "Initializes a toast container",
  "structure": {
    "name": "root",
    "restrict": [
      "div"
    ],
    "description": "Initializes toast notification",
    "attributes": {
      "static": {
        "role": "status",
        "class": "slds-notify slds-notify_toast"
      }
    },
    "children": [
      {
        "name": "container",
        "restrict": [
          "div"
        ],
        "description": "Initializes a toast container",
        "children": [
          {
            "name": "liveRegion",
            "restrict": [
              "div"
            ],
            "description": "Assistive live region that announces the toast to screen readers",
            "attributes": {
              "static": {
                "aria-live": "assertive",
                "aria-atomic": "true",
                "class": "slds-assistive-text"
              }
            },
            "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",
                "class": "slds-notification"
              }
            },
            "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",
                            "attributes": {
                              "static": {
                                "class": "slds-icon slds-icon_small"
                              }
                            },
                            "children": [
                              {
                                "name": "iconUse"
                              }
                            ]
                          },
                          {
                            "name": "iconAssistiveText",
                            "restrict": [
                              "span"
                            ],
                            "description": "Assistive text describing the icon",
                            "slot": {
                              "name": "iconAssistiveText"
                            },
                            "attributes": {
                              "static": {
                                "class": "slds-assistive-text"
                              }
                            }
                          }
                        ],
                        "attributes": {
                          "static": {
                            "class": "slds-icon_container slds-media__figure slds-m-right_small"
                          }
                        },
                        "variants": [
                          {
                            "name": "standardIcon",
                            "description": "Standard sprite glyph applied to the notification icon container",
                            "options": [
                              {
                                "value": "event",
                                "class": "slds-icon-standard-event",
                                "description": "Event notification glyph"
                              },
                              {
                                "value": "task",
                                "class": "slds-icon-standard-task",
                                "description": "Task notification glyph"
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "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"
                                },
                                "attributes": {
                                  "static": {
                                    "class": "slds-assistive-text"
                                  }
                                }
                              }
                            ],
                            "attributes": {
                              "static": {
                                "class": "slds-text-heading_small slds-m-bottom_xx-small"
                              }
                            }
                          },
                          {
                            "name": "message",
                            "restrict": [
                              "p"
                            ],
                            "description": "Toast message",
                            "slot": {
                              "name": "default"
                            }
                          }
                        ],
                        "attributes": {
                          "static": {
                            "class": "slds-notify__content slds-media__body"
                          }
                        }
                      }
                    ],
                    "attributes": {
                      "static": {
                        "class": "slds-notification__target slds-media"
                      }
                    }
                  },
                  {
                    "name": "close",
                    "restrict": [
                      "button"
                    ],
                    "description": "Alert close button",
                    "renderWhen": "slotFilled",
                    "children": [
                      {
                        "name": "closeIcon",
                        "description": "Close icon SVG",
                        "component": "PrimitiveIcon",
                        "attributes": {
                          "static": {
                            "class": "slds-button__icon"
                          }
                        },
                        "children": [
                          {
                            "name": "closeIconUse"
                          }
                        ]
                      },
                      {
                        "name": "closeAssistiveText",
                        "restrict": [
                          "span"
                        ],
                        "description": "Assistive label for the dismiss button",
                        "slot": {
                          "name": "closeAssistiveText"
                        },
                        "attributes": {
                          "static": {
                            "class": "slds-assistive-text"
                          }
                        }
                      }
                    ],
                    "attributes": {
                      "static": {
                        "class": "slds-button slds-button_icon slds-button_icon-container slds-notify__close slds-notification__close"
                      }
                    }
                  }
                ],
                "attributes": {
                  "static": {
                    "class": "slds-notification__body"
                  }
                }
              }
            ]
          },
          {
            "name": "assistiveText",
            "restrict": [
              "span"
            ],
            "description": "Generic assistive text region for non-live announcements",
            "slot": {
              "name": "assistiveText"
            },
            "attributes": {
              "static": {
                "class": "slds-assistive-text"
              }
            }
          }
        ],
        "attributes": {
          "static": {
            "class": "slds-notify_container slds-notification-container"
          }
        }
      }
    ],
    "variants": [
      {
        "name": "variant",
        "description": "Toast variant/severity",
        "default": "info",
        "options": [
          {
            "value": "info",
            "class": "slds-theme_info",
            "description": "Informational toast"
          },
          {
            "value": "success",
            "class": "slds-theme_success",
            "description": "Success toast"
          },
          {
            "value": "warning",
            "class": "slds-theme_warning",
            "description": "Warning toast"
          },
          {
            "value": "error",
            "class": "slds-theme_error",
            "description": "Error toast"
          }
        ]
      }
    ]
  },
  "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"
        }
      }
    }
  },
  "extensions": {
    "com.salesforce-ux": {
      "dateAdded": "2016-03-01",
      "genReady": false,
      "lbc": "lightning-toast"
    }
  },
  "cssSource": "./toast.css",
  "styleApi": {
    "status": "stable",
    "ready": true
  }
}
