CodeAI

Modal

Blocking overlay for rich interactive content (forms, media, multi-step flows).

Appearance

Content

Layout & behavior

Props — Modal
View MUI docs
PropTypeDescription
type"default" | "verticalImage" | "horizontalImage"Layout variant for rich modal content.
titleReactNodeHeader title.
bodyReactNodeDefault body copy (pre-seed). Used when children is omitted — full body on default, text slot on image layouts.
imageReactNodeImage slot for image layout variants.
childrenReactNodeCustom content for the body text slot. Replaces body for every type; image layouts keep the fixed image slot.
hasSecondaryActionbooleanShow the secondary footer button.
primaryActionLabelReactNodePrimary button label.
secondaryActionLabelReactNodeSecondary button label.
isDismissablebooleanAllow dismiss via close control or backdrop.
onClose() => voidCalled when the modal is dismissed.
openbooleanControls modal visibility.
surfaceOnlybooleanRender the modal surface without open/close behavior.