Spectrum Components API

Schema version: 6.0.0

Alert dialog

Alert dialogs display important information that users need to acknowledge. They appear over the interface and block further interactions until an action is selected.

PropertyValuesDefault valueRequired
title
text
-
description
text
-
variant
confirmation / information / warning / destructive / error
confirmation
primary action label
text
-
secondary action label
text
If undefined, this button does not appear.
-
cancel action label
text
If undefined, this button does not appear.
-
{
  "slug": "alert-dialog",
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/component.json",
  "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/components/alert-dialog.json",
  "title": "Alert dialog",
  "description": "Alert dialogs display important information that users need to acknowledge. They appear over the interface and block further interactions until an action is selected.",
  "meta": {
    "category": "feedback",
    "documentationUrl": "https://spectrum.adobe.com/page/alert-dialog/"
  },
  "type": "object",
  "properties": {
    "title": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "variant": {
      "type": "string",
      "enum": [
        "confirmation",
        "information",
        "warning",
        "destructive",
        "error"
      ],
      "default": "confirmation"
    },
    "primaryActionLabel": {
      "type": "string"
    },
    "secondaryActionLabel": {
      "type": "string",
      "description": "If undefined, this button does not appear."
    },
    "cancelActionLabel": {
      "type": "string",
      "default": "cancel",
      "description": "If undefined, this button does not appear."
    }
  }
}
← Back to home