Modal
A dialog overlay for confirmations, forms, or detailed content.
When to Use
- For confirmation dialogs before destructive actions
- To display forms or detailed content in an overlay
- For quick info, success, error, or warning messages
Import
Examples
Basic
Confirmation
Static Methods
API
ModalProps
open—boolean— Whether visible (controlled)title—ReactNode— Modal titlefooter—ReactNode | null— Footer buttons (null to hide)onOk—() => void— OK button callbackonCancel—() => void— Cancel/close callbackwidth—string | number— Modal width (default:520)centered—boolean— Center vertically (default:false)closable—boolean— Show close button (default:true)confirmLoading—boolean— OK button loading statemaskClosable—boolean— Close on mask click (default:true)okText—string— OK button text (default:"OK")cancelText—string— Cancel button text (default:"Cancel")okType—ButtonType— OK button type (default:"primary")destroyOnClose—boolean— Unmount children on close (default:false)afterClose—() => void— Called after close animationzIndex—number— Z-index value
Static Methods
Modal.confirm(config)— Confirmation dialogModal.info(config)— Information dialogModal.success(config)— Success dialogModal.error(config)— Error dialogModal.warning(config)— Warning dialog