MessageModalLayout

Components/Overlays/Modal

Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/messagemodallayout

Overview

Copy

Message modals display short messages letting users confirm or cancel an action before moving forward. They're used inside <Modal/> overlays.

Do

  • Get confirmation before destructive or irreversible actions.
  • Update users about important changes, such as updated terms and conditions.
  • Inform users that selected features are Premium and upgrading is required.
  • Use it after an intentional user action and only when it is completely necessary. Because they are intrusive, modals should be used sparingly.

Don't

  • Don't show more detailed custom content. Use <CustomModalLayout/> instead.
  • Don't preview files like images, videos or PDFs. Use <ModalPreviewLayout/> instead.
  • Don't use them in mobile environments. Use <ModalMobileLayout/> instead.

Feature examples

Skin

Use different skin to set the overall look of the modal and its action buttons:

  • For general cases use standard(default).
  • Promote Premium features with premium.
  • To inform users of the negative implications of an action, like loss of data, use destructive .
Copy

Help and close buttons

Add a help button with the onHelpButtonClick prop. Use it to direct users to support.

Close button is required for all modals. Control its function with theonCloseButtonClick prop.

Both can be customised with closeButtonProps and helpButtonProps.

Copy

Illustration

Add visuals to the left side of the content to support main modal messages using the illustration prop.

Use 120x120 px illustrations and coordinate the skin with the theme of the modal.

Note: For Wix products, browse all available illustrations or request a new one on Wix UX Illustrations.

Copy

Side actions

Add supplementary actions in the sideActions container.

Copy

Footnote

Add supplementary text and/or links into the footnote container.

Use the footnoteSkin prop to define it as neutral (default) or light.

Copy

Title and subtitle

Add short text to summarize modal content using the title prop.

Use optional subtitle prop to add secondary text below the modal title.

Copy

Action buttons

Specify labels for primary and secondary actions with primaryButtonText and secondaryButtonText props.

For additional styling, like adding a prefix icon, use any available <Button/> props in primaryButtonProps and secondaryButtonProps.

Use the actionsSize prop to control the size of the primary and secondary action buttons.

Copy

Developer examples

Mobile

On mobile, MessageModal maps to Drawer for context-sensitive confirmations (e.g., seeing what is being deleted).

When context is less important, use ModalMobileLayout for standalone confirmations.

To see the change, toggle 'Enable mobile support' in the top bar of Storybook.

Copy

Common use case examples

Warn about destructive changes

Use the destructive theme to bring more attention to modals that confirm irreversible actions.

Use the <Text/> component props to style the modal content.

Copy

Alert users to unsaved changes

Use a message modal to inform users that their changes won't be saved if the action is taken.

Copy

Promote Premium features

Use the illustration prop to support upgrade messages. Illustrations can showcase the features available with upgrades.

Copy

Code

Copy

Props

NameTypeDefaultDescription
actionsSize"small" | "tiny" | "medium" | "large"—Determines the action buttons size.
childrenReactNode—Accepts any item as a child element. For all common cases pass a standard text string.
closeButtonPropsModalCloseButtonProps—Close button props.
contentReactNode—Contains modal's message in its middle area. children are passed as content, too.
contentClassNamestring—
dataHookstring—Applies a data-hook HTML attribute to be used in the tests.
footerClassNamestring—
footnoteReactNode—Renders supplementary text or other components at the bottom of the modal.
footnoteClassNamestring—
footnoteSkin"light" | "neutral"—Sets the look and feel of the footnote.
headerClassNamestring—
helpButtonPropsModalControlButtonProps—Help button props.
illustrationReactNode—Contains a 120x120 px illustration at the left side of the modal.
illustrationClassNamestring—
onCloseButtonClickMouseEventHandler—
onHelpButtonClickMouseEventHandler—
primaryButtonOnClick() => void—Defines a call-back function after user clicks on the primary button.
primaryButtonPropsOmit<ButtonProps, "internalDataHook">—Passes on any <Button/> properties on the primary button.
primaryButtonTextReactNode—Sets text label for the primary button.
primaryButtonTooltipPropsOmit<TooltipProps, "children">—
secondaryButtonOnClick() => void—Defines a call-back function after user clicks on the secondary button.
secondaryButtonPropsOmit<ButtonProps, "internalDataHook">—Passes on any <Button/> properties on the secondary button.
secondaryButtonTextReactNode—Sets text label for the secondary button.
sideActionsReactNode—Contains a checkbox or other components at the start of the footer.
skin"standard" | "destructive" | "premium"—a global skin for the modal, will affect footer buttons skin.
styleCSSProperties—
subtitleReactNode—Sets text subtitle for the modal; can be used in conjunction with other components.
theme"standard" | "destructive" | "premium"—Controls the skin of the modal when skin isn't set.
titleReactNode—Sets text title for the modal; can be used in conjunction with other components.

Testkit

Import the driver matching your test environment:

Copy

Driver methods

MethodDescription
getThemeGets the modal theme
getSkinGets the modal skin
clickCloseButtonClicks the modal close-button
clickHelpButtonClicks the modal help-button
childExistsChecks whether a node with the provided dataHook exists
getTitleTextGets the title's text
getSubtitleTextGets the subtitle's text
secondaryButtonDriverGets the secondary button driver
getSecondaryButtonDriverGets the secondary button driver
primaryButtonDriverGets the primary button driver
getPrimaryButtonDriverGets the primary button driver
getPrimaryButtonTooltipContentGets the primary button's tooltip content
getIllustrationSrcGets the illustration source
existsChecks whether the component found with the given data hook.
elementGets the component root element.
clickClicks on the component root element.
baseReturns UniDriver for the base element.

Changelog

  • 1.339.0 (2026-10-19) — maintenance release, no component-specific changes
  • 1.338.0 (2026-10-15) — maintenance release, no component-specific changes
  • 1.331.0 (2026-10-01) — fix: the help and close buttons in the top corner are spaced as designed again in Harmony (odeditor), Studio 2.0 (odeditor-dark) and Studio 2.0 Light (studio2-light). (#17314)
  • 1.330.1 (2026-09-28) — maintenance release, no component-specific changes
  • 1.330.0 (2026-09-28) — maintenance release, no component-specific changes
  • 1.329.0 (2026-09-24) — maintenance release, no component-specific changes
  • 1.328.0 (2026-09-22) — maintenance release, no component-specific changes
  • 1.325.0 (2026-09-17) — maintenance release, no component-specific changes
  • 1.324.0 (2026-09-14) — maintenance release, no component-specific changes
  • 1.310.0 (2026-08-10) — maintenance release, no component-specific changes
  • 1.308.0 (2026-08-04) — maintenance release, no component-specific changes
  • 1.305.1 (2026-07-30) — maintenance release, no component-specific changes
  • 1.305.0 (2026-07-28) — maintenance release, no component-specific changes
  • 1.303.0 (2026-07-23) — maintenance release, no component-specific changes
  • 1.299.0 (2026-07-17) — breaking: use tertiary button priority and tiny-normal footnote typography (#16578) — has visual changes
  • 1.292.0 (2026-06-22) — maintenance release, no component-specific changes
  • 1.291.0 (2026-06-19) — maintenance release, no component-specific changes
  • 1.273.0 (2026-04-30) — maintenance release, no component-specific changes
  • 1.266.0 (2026-04-07) — maintenance release, no component-specific changes
  • 1.253.0 (2026-01-30) — maintenance release, no component-specific changes
  • 1.247.2 (2026-01-21) — maintenance release, no component-specific changes
  • 1.235.0 (2025-12-04) — maintenance release, no component-specific changes
  • 1.214.0 (2025-08-22) — maintenance release, no component-specific changes
  • 1.213.0 (2025-08-19) — maintenance release, no component-specific changes
  • 1.208.0 (2025-07-25) — maintenance release, no component-specific changes
  • 1.197.0 (2025-06-06) — breaking: tokenization (#14922)
  • 1.196.0 (2025-06-04) — maintenance release, no component-specific changes
  • 1.138.1 (2024-10-30) — maintenance release, no component-specific changes
  • 1.134.0 (2024-10-18) — fix: add missing types for subtitle prop (#14218)
  • 1.131.0 (2024-10-10) — fix: fix button text types (#14196)
  • 1.115.0 (2024-07-17) — maintenance release, no component-specific changes
  • 1.106.0 (2024-05-24) — maintenance release, no component-specific changes
  • 1.105.0 (2024-05-21) — maintenance release, no component-specific changes
  • 1.102.0 (2024-04-16) — maintenance release, no component-specific changes
  • 1.98.0 (2024-03-15) — maintenance release, no component-specific changes
  • 1.93.0 (2024-02-08) — maintenance release, no component-specific changes
  • 1.92.1 (2024-02-05) — maintenance release, no component-specific changes

Last updated: 21 October 2026

Did this help?