Overview
Edit profile
Update your display name and bio.
Ahmad Dani
🗑
Delete account?
All your data will be permanently deleted.
For simple yes/no confirmations, consider a compact
AlertDialog. Use Drawer or Sheet for side-panel interactions that don’t block the full screen.Installation
Usage
Variants
Default Modal
Standard dialog for forms or informational content.Edit profile
Update your display name and bio.
Ahmad Dani
Warning Modal
⚠
Unpublish page?
This page will no longer be visible to users.
Destructive Modal
Delete account?
All your data will be permanently deleted. This cannot be undone.
API Reference
Modal (Root)
ModalContent
ModalFooter
Accessibility
- Modal uses
role="dialog"witharia-modal="true" - Focus is trapped inside the modal while open
- Pressing Escape closes the modal
- Focus returns to the trigger element when the modal closes
ModalTitleis linked viaaria-labelledbyModalDescriptionis linked viaaria-describedby
Do’s & Don’ts
Do
- Use Modal for actions that require the user’s complete attention
- Keep modals focused on a single task
- Always provide a clear Cancel/Close action
- Use destructive
iconVariantfor irreversible actions
Don't
- Don’t use Modal for non-critical information — use Toast or Alert
- Don’t nest modals inside other modals
- Don’t make modals too large — keep content scannable
- Don’t auto-close a modal after a destructive action without confirmation