A Modal is window containing contextual information, tasks, or workflows that appear over the user interface. The content behind a modal dialog is inert, meaning that users cannot interact with it.
View source codebooleanWhether the modal should be open
stringThe title of the Modal
ReactNodeActions to display in the Modal
ReactNodeThe content of the Modal
stringclassName for the element
"adjustments-horizontal" | "archive" | "arrow-down-tray" | "arrow-down" | "arrow-left-right" | "arrow-left" | "arrow-merge" | "arrow-path" | "arrow-pointing-out" | "arrow-right-rectangle" | "arrow-right" | "arrow-split" | "arrow-top-right-square" | "arrow-turn-right" | "arrow-up-tray" | "arrow-up" | ... 143 more ...The icon to display in the button
"alert" | "apricot" | "blue" | "carbon" | "emerald" | "forest" | "grolive" | "info" | "lemon" | "neutral" | "ocean" | "peach" | "pink" | "purple" | "success" | "warning"Specifies the icon variant
Default: infoReactNodeThe illustration to display on top of the Modal
stringSpecifies the illustration height
Default: 424pxbooleanWhether the modal should have opening and closing animation
Default: falseMouseEventHandler<HTMLButtonElement>Handler that is called when the Modal is closed
ElementThe element where to mount the Modal. It needs to be outside the GrapesProvider tree for the focus trap to work properly.
Default: document.bodystringThe subtitle of the Modal
booleanWhether the modal should be open
ReactNodeThe content of the ModalOverlay
stringclassName for the element
booleanWhether the modal should have opening and closing animation
Default: falseElementThe element where to mount the Modal. It needs to be outside the GrapesProvider tree for the focus trap to work properly.
Default: document.bodynumberTime to wait before removing the element on exit. Used only when onAnimationEnd is not supported
Default: 200ReactNodeThe content of the Modal
stringclassName for the element
MouseEventHandler<HTMLButtonElement>Handler that is called when the Modal is closed. If not provided, the Close button won't be displayed
"adjustments-horizontal" | "archive" | "arrow-down-tray" | "arrow-down" | "arrow-left-right" | "arrow-left" | "arrow-merge" | "arrow-path" | "arrow-pointing-out" | "arrow-right-rectangle" | "arrow-right" | "arrow-split" | "arrow-top-right-square" | "arrow-turn-right" | "arrow-up-tray" | "arrow-up" | ... 143 more ...The icon to display
stringThe title of the Modal
"alert" | "apricot" | "blue" | "carbon" | "emerald" | "forest" | "grolive" | "info" | "lemon" | "neutral" | "ocean" | "peach" | "pink" | "purple" | "success" | "warning"Specifies the icon variant
Default: infostringThe Subtitle of the Modal
stringThe title's unique identifier. Same identifier should be pass to ModalContent using aria-labelledby.
ReactNodeThe illustration to display
stringThe title of the Modal
stringSpecifies the illustration height.
Default: 424pxstringThe Subtitle of the Modal
stringThe title's unique identifier. Same identifier should be pass to ModalContent using aria-labelledby.
ReactNodeThe modal's main content.
stringclassName for the element
ReactNodeThe modal actions