Feedback & Status

Modal

A modal is an overlay element which blocks interaction with elements outside it.

A modal is an overlay element which blocks interaction with elements outside it. Use Sheet for panels that slide in from an edge of the viewport.

Component props#

NameTypeDescription
placementstring"center" | "fullscreen" (default: "center")
isDismissablebooleanCan be dismissed by clicking outside (default: true)
isKeyboardDismissDisabledbooleanDisables Escape key dismissal
isOpenbooleanControlled open state. Used when the modal is not wrapped in a DialogTrigger
defaultOpenbooleanInitial open state. Used when the modal is not wrapped in a DialogTrigger
onOpenChange(open: boolean) => voidCalled when the open state changes
showCloseButtonbooleanRenders a quiet close button in the top-right corner (default: false)

Parts#

Modal can also be composed directly with the shadcn-style parts, which map onto the Base UI dialog primitives.

NameTypeDescription
ModalTriggercomponentOpens the modal
ModalClosecomponentCloses the modal
ModalTitlecomponentAccessible title, rendered as a Heading
ModalDescriptioncomponentAccessible description, rendered as muted Text

A fullscreen modal now removes the inner dialog's border, radius and shadow automatically, so no className override is needed.