name: Prompt description: A prompt is a modal dialog that asks the user to confirm an action or provide input. It typically contains a question or message, along with action buttons for the user to respond. category: Overlay slds_classes: root: '' elements: [] modifiers: [] states: - class: slds-is-open description: Open state for prompt modal trigger: When prompt is visible - class: slds-is-disabled description: Disabled state for prompt actions trigger: When prompt actions are not interactive variants: - name: Base description: Standard prompt modal dialog classes: [] usage_context: Default prompt implementation differences: Modal dialog with header, body, and footer sections lightning_component: name: lightning-modal url: https://developer.salesforce.com/docs/component-library/bundle/lightning-modal mapping_notes: Lightning modal can be configured as a prompt with appropriate content and actions accessibility: keyboard_support: - Tab to navigate between focusable elements - Shift+Tab to navigate backwards - Escape to close the prompt - Enter to confirm (when appropriate) screen_reader: - Prompt title announced - Prompt content announced - Action buttons announced - Close button announced aria_attributes: - role='dialog' or 'alertdialog' on prompt container - aria-labelledby pointing to prompt title - aria-describedby pointing to prompt content - aria-modal='true' on dialog - aria-label on close button - Focus trap within modal usage_guidelines: when_to_use: - When user confirmation is required before an action - For destructive actions that need confirmation - When user input is needed in a modal context - For important decisions that require user attention when_not_to_use: - For simple informational messages (use alerts) - For non-critical confirmations (use inline confirmations) - When action can be easily undone - For frequent, repetitive confirmations best_practices: - Use clear, concise messaging - Provide specific action button labels - Make destructive actions clearly distinguishable - Ensure proper focus management - Provide keyboard shortcuts for common actions - Use appropriate dialog role (dialog vs alertdialog) - Include a way to dismiss (close button or cancel) common_mistakes: - Overusing prompts for non-critical actions - Unclear or vague messaging - Missing keyboard navigation - Not trapping focus within modal - Missing ARIA attributes - No way to dismiss the prompt code_examples: - title: Basic Prompt code: "
Are\ \ you sure you want to perform this action?
\nThis\ \ action cannot be undone. Are you sure you want to delete this record?
\n