Skip to content
+

Modal

The Modal component lets you create dialogs, popovers, lightboxes, and other elements that force the user to take action before continuing.

useModal API

Import

import { unstable_useModal as useModal } from '@mui/base/unstable_useModal';
// or
import { unstable_useModal as useModal } from '@mui/base';
Learn about the difference by reading this guide on minimizing bundle size.

Parameters

childrenRequired

openRequired

rootRefRequired

aria-hidden

closeAfterTransition

container

disableEscapeKeyDown

disableScrollLock

onClose

onKeyDown

onTransitionEnter

onTransitionExited

Return value

exited

getBackdropProps

getRootProps

getTransitionProps

hasTransition

isTopModal

portalRef

rootRef