Optimized for: Gemini / ChatGPT / Claude
Advanced AI Prompt for Radix UI Alert Dialog with Critical Path Focus
Use this engineered prompt to drastically optimize your workflow and output.
Required Variables
- ✦
[ACTION_TYPE] - ✦
[DANGER_LEVEL] - ✦
[AUTO_FOCUS_TARGET]
radix-alert-dialog-critical-path.txt
Create a high-stakes Radix UI Alert Dialog for [ACTION_TYPE] (e.g., permanent deletion). Based on the [DANGER_LEVEL], determine the [AUTO_FOCUS_TARGET] (e.g., the 'Cancel' button vs the 'Confirm' button). Ensure the 'AlertDialog.Description' is properly linked to the content for screen reader verbosity. Implement a 'double-check' pattern where the confirm button is disabled for 2 seconds to prevent accidental double-clicks. Code must strictly follow the Alert Dialog WAI-ARIA pattern which differs from a standard Dialog.
Example Output
"The AI provides a specialized Alert component that defaults focus to the 'Cancel' button for safety, including an ARIA-describedby link to the warning message."