{
  "_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": "Prompt",
  "description": "Initializes Prompt style notification",
  "structure": {
    "name": "root",
    "restrict": [
      "section",
      "div"
    ],
    "description": "Initializes Prompt style notification",
    "attributes": {
      "static": {
        "role": "alertdialog",
        "aria-modal": "true",
        "tabindex": "0",
        "class": "slds-modal slds-fade-in-open slds-modal_prompt"
      },
      "bound": {
        "aria-labelledby": {
          "prop": "headingId"
        },
        "aria-describedby": {
          "prop": "contentId"
        }
      }
    },
    "children": [
      {
        "name": "container",
        "restrict": [
          "div"
        ],
        "description": "Prompt dialog container",
        "children": [
          {
            "name": "header",
            "restrict": [
              "div",
              "header"
            ],
            "description": "Prompt header band (carries the variant theme color and texture)",
            "children": [
              {
                "name": "icon",
                "restrict": [
                  "span"
                ],
                "description": "Optional decorative icon shown alongside the heading",
                "renderWhen": "slotFilled",
                "slot": {
                  "name": "icon"
                }
              },
              {
                "name": "heading",
                "restrict": [
                  "h1",
                  "h2"
                ],
                "description": "Prompt heading",
                "slot": {
                  "name": "heading",
                  "required": true
                },
                "attributes": {
                  "static": {
                    "class": "slds-text-heading_medium"
                  }
                }
              }
            ],
            "attributes": {
              "static": {
                "class": "slds-modal__header slds-theme_alert-texture"
              }
            },
            "variants": [
              {
                "name": "variant",
                "description": "Prompt theme applied to the header band",
                "default": "info",
                "options": [
                  {
                    "value": "info",
                    "class": "slds-theme_info",
                    "description": "Informational prompt"
                  },
                  {
                    "value": "success",
                    "class": "slds-theme_success",
                    "description": "Success prompt"
                  },
                  {
                    "value": "warning",
                    "class": "slds-theme_warning",
                    "description": "Warning prompt"
                  },
                  {
                    "value": "error",
                    "class": "slds-theme_error",
                    "description": "Error prompt"
                  },
                  {
                    "value": "offline",
                    "class": "slds-theme_offline",
                    "description": "Offline prompt"
                  }
                ]
              }
            ]
          },
          {
            "name": "content",
            "restrict": [
              "div"
            ],
            "description": "Prompt message content wrapper",
            "children": [
              {
                "name": "message",
                "restrict": [
                  "p"
                ],
                "description": "Default-slotted message paragraph",
                "slot": {
                  "name": "default"
                }
              }
            ],
            "attributes": {
              "static": {
                "class": "slds-modal__content slds-p-around_medium"
              }
            }
          },
          {
            "name": "footer",
            "restrict": [
              "div",
              "footer"
            ],
            "description": "Prompt footer hosting the acknowledgement action(s)",
            "children": [
              {
                "name": "action",
                "restrict": [
                  "button"
                ],
                "description": "Acknowledgement button rendered in the prompt footer",
                "slot": {
                  "name": "footer",
                  "required": true
                },
                "attributes": {
                  "static": {
                    "class": "slds-button slds-button_neutral"
                  }
                }
              }
            ],
            "attributes": {
              "static": {
                "class": "slds-modal__footer slds-theme_default"
              }
            }
          }
        ],
        "attributes": {
          "static": {
            "class": "slds-modal__container"
          }
        }
      },
      {
        "name": "backdrop",
        "restrict": [
          "div"
        ],
        "description": "background overlay behind prompt",
        "attributes": {
          "static": {
            "role": "presentation",
            "class": "slds-backdrop slds-backdrop_open"
          }
        }
      }
    ]
  },
  "states": [
    {
      "name": "open",
      "type": "boolean",
      "description": "Whether the prompt dialog is visible"
    }
  ],
  "accessibility": {
    "requirements": [
      {
        "id": "alertdialog-role",
        "description": "Must have role='alertdialog' (the legacy blueprint used 'dialog'; alertdialog is the correct ARIA pattern for a prompt requiring user acknowledgment)"
      },
      {
        "id": "focus-trap",
        "description": "Focus must be trapped within prompt"
      },
      {
        "id": "labelledby",
        "description": "aria-labelledby must reference the heading element id"
      },
      {
        "id": "describedby",
        "description": "aria-describedby must reference the content wrapper id"
      }
    ]
  },
  "extensions": {
    "com.salesforce-ux": {
      "dateAdded": "2017-03-01",
      "genReady": false,
      "lbc": "lightning-prompt"
    },
    "com.salesforce-ux.customization": {
      "description": "Per-hook overrides for the Customization story that beat the test-value generator.",
      "hooks": {
        "--slds-c-modal-color-background": "#f3e8ff",
        "--slds-c-modal-radius-border": "12px",
        "--slds-c-modal-shadow": "0 2px 6px rgba(74, 20, 140, 0.3)",
        "--slds-c-modal-header-sizing-border": "3px",
        "--slds-c-modal-header-color-border": "#0284c7",
        "--slds-c-modal-footer-sizing-border": "3px",
        "--slds-c-modal-footer-color-border": "#d97706",
        "--slds-c-modal-header-font-weight": "700",
        "--slds-c-modal-header-font-size": "1.25rem",
        "--slds-c-modal-header-font-line-height": "1.6",
        "--slds-c-modal-header-font-align": "right",
        "--slds-c-modal-header-color-background": "#e0f2fe",
        "--slds-c-modal-header-color-foreground": "#0c4a6e",
        "--slds-c-modal-header-spacing-block": "16px",
        "--slds-c-modal-header-spacing-inline": "24px",
        "--slds-c-modal-content-color-background": "#dcfce7",
        "--slds-c-modal-content-color-foreground": "#14532d",
        "--slds-c-modal-footer-color-background": "#fef3c7",
        "--slds-c-modal-footer-color-foreground": "#78350f",
        "--slds-c-modal-footer-spacing-block": "16px",
        "--slds-c-modal-footer-spacing-inline": "24px",
        "--slds-c-modal-footer-button-spacing-gap": "24px",
        "--slds-c-modal-footer-button-align": "left",
        "--slds-c-modal-close-size": "64px",
        "--slds-c-modal-close-color-background": "#fee2e2",
        "--slds-c-modal-close-color-background-hover": "#fecaca",
        "--slds-c-modal-close-color-border": "#dc2626",
        "--slds-c-modal-close-sizing-border": "3px",
        "--slds-c-modal-close-sizing-outline": "3px",
        "--slds-c-modal-close-shadow-focus": "0 0 0 4px rgba(2, 119, 189, 0.55)"
      }
    }
  },
  "cssSource": "./prompt.css",
  "styleApi": {
    "status": "stable",
    "ready": true
  }
}
