Alert Dialog
A modal confirmation that asks for a deliberate decision before a consequential action.
Paste this into your agent.
Alert Dialog comes right before an action that is hard to undo, such as deleting a project or discarding unsaved changes. It interrupts on purpose and offers Confirm and Cancel. Your code runs the action.
Install
bashnpx shadcn@4.18.0 add @siteplane/alert-dialog
Import it from @/siteplane/components/alert-dialog. The project needs Siteplane UI's one-time setup first: .
When to pick it
- vs : Pick Dialog instead when the overlay holds fields or several steps.
- vs : Pick Toast with an undo action instead when the action is reversible and does not justify an interruption.
- vs : Pick Alert instead when the message needs no response from the user.
Rules
- Write a title that names the action and a description that states the consequence.
- Control the root with open and onOpenChange when confirming runs a request, and close it only after the request succeeds.
- Show loading on the confirm button while the request runs and ignore dismissal until it settles.
- AlertDialogPopup includes the backdrop and viewport; don't wrap it in another portal.
- Below 640 px the popup becomes a full-width bottom sheet.
Reference
Add to your agent
Print this skill from the terminal, or connect the whole catalog over MCP. Setup guides
CLI
MCP server
Questions
Related skills
Accessible Focus Statesby UI Skillbook
Keep a visible, high-contrast focus indicator on every interactive element, without a generic browser outline or none at all.
Accessibility
Better Accessibilityby jakubkrehel
Review and improve focus states, keyboard support, ARIA, forms, screen readers, hit areas, and motion accessibility.
AccessibilityExternalGitHub stars: 9.2K
Build Primitiveby PrototyperAI
Build foundational UI primitives from scratch with strong ARIA, keyboard, focus, and state handling.
AccessibilityExternalGitHub stars: 7
Link Purposeby AccessLint
Compatibility listing for link-purpose installs from AccessLint's marketplace skill set.
AccessibilityExternalGitHub stars: 114