Components/Overlays/Modal/ModalMobileLayout
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/modalmobilelayout
Use modal mobile layout inside a <Modal/> to display content on mobile screens. You can add a title and a footer with actions related to the content.
- Use it for modals on mobile screens.
- Make the title and footer sticky when the content scrolls, so they stay in view.
- Use the fullscreen layout when the content is long.
- Don't use it on desktop screens. Use
<MessageModalLayout/> or <CustomModalLayout/> instead.
- Don't hide the close button unless the footer gives users another way to close the modal.
A simple example with short content and buttons in the footer.
| Name | Type | Default | Description |
|---|
content | ReactNode | — | Accepts any content to render in the body of the modal. |
dataHook | string | — | Applied as data-hook HTML attribute that can be used in the tests. |
footer | ReactNode | — | Accepts any content to render in the footer of the modal. |
fullscreen | boolean | — | If true, the modal takes up the whole screen. |
onCloseButtonClick | MouseEventHandler | — | Defines a callback function which is called when the close button is clicked. The close button is displayed only when this prop is provided. |
onOverlayClick | () => void | — | Defines a callback function which is called when the overlay around the modal is clicked. Applies only when the modal isn't fullscreen. |
stickyFooter | boolean | — | If true, the footer is sticky to the bottom of the modal. |
stickyTitle | boolean | — | If true, the title is sticky to the top of the modal. |
title | ReactNode | — | Sets the title displayed in the header strip of the modal. |
Import the driver matching your test environment:
| Method | Description |
|---|
title | Gets the title node |
getTitle | — |
content | Gets the content node |
getContent | Gets the content node |
getFooter | Gets the footer node |
footer | Gets the footer node |
clickOverlay | Clicks on the overlay |
clickCloseButton | Clicks on the close button |
closeButtonExists | Checks whether close button exist |
exists | Checks whether the component found with the given data hook. |
element | Gets the component root element. |
click | Clicks on the component root element. |
base | Returns UniDriver for the base element. |
- 1.340.0 (2026-10-21) — maintenance release, no component-specific changes
- 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) — maintenance release, no component-specific changes
- 1.330.3 (2026-09-29) — 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.322.0 (2026-09-09) — maintenance release, no component-specific changes
- 1.321.0 (2026-09-08) — maintenance release, no component-specific changes
- 1.310.0 (2026-08-10) — maintenance release, no component-specific 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.266.0 (2026-04-07) — fix: fixed issue with title not wrapping (#16109) — has visual changes
- 1.260.0 (2026-03-17) — maintenance release, no component-specific changes
- 1.254.0 (2026-02-03) — maintenance release, no component-specific changes
- 1.253.0 (2026-01-30) — maintenance release, no component-specific changes
- 1.250.0 (2026-01-27) — maintenance release, no component-specific changes
- 1.247.2 (2026-01-21) — maintenance release, no component-specific changes
- 1.242.0 (2025-12-19) — maintenance release, no component-specific changes
- 1.212.0 (2025-08-11) — maintenance release, no component-specific changes
- 1.138.1 (2024-10-30) — maintenance release, no component-specific changes
- 1.133.0 (2024-10-14) — maintenance release, no component-specific changes
- 1.111.0 (2024-06-26) — maintenance release, no component-specific changes
- 1.102.0 (2024-04-16) — maintenance release, no component-specific changes
- 1.92.1 (2024-02-05) — maintenance release, no component-specific changes