> To build a Wix site agentically, or add Wix features like bookings or a store to a site you already have, follow https://www.wix.com/headless/skill.md
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: ModalMobileLayout Component

## Article: ModalMobileLayout Component

## Article Link: https://dev.wix.com/docs/wix-design-system/components/overlays/modal/modal-mobile-layout-component.md

## Article Content:

# ModalMobileLayout

_Components/Overlays/Modal/ModalMobileLayout_

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

## Overview

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.

### Do

- 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

- 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.

### Feature examples

#### Plain Example

A simple example with short content and buttons in the footer.

```jsx
() => {
  const [open, setOpen] = React.useState(false);

  return (
    <div>
      <Button onClick={() => setOpen(!open)}>Open</Button>
      <Modal
        isOpen={open}
        onRequestClose={() => setOpen(false)}
        contentLabel="Mobile modal example"
        scrollable={false}
        scrollableContent
        screen="mobile"
      >
        <ModalMobileLayout
          title={<Text weight="bold">Enter VAT ID</Text>}
          content={
            <Text weight="thin">
              Enter a valid European Union VAT identification number for the
              ‘Reverse Charge’ mechanism in order to apply.
            </Text>
          }
          footer={
            <Box align="right">
              <Box marginRight="12px">
                <Button priority="secondary" onClick={() => setOpen(false)}>
                  Cancel
                </Button>
              </Box>
              <Button onClick={() => setOpen(false)}>OK</Button>
            </Box>
          }
          onOverlayClick={() => setOpen(false)}
        />
      </Modal>
    </div>
  );
};
```

#### Title

```jsx
<Layout>
  <Cell>
    <ModalMobileLayout
      title={<Text weight="bold">Enter VAT ID</Text>}
      content={
        <Text weight="thin" secondary>
          Enter a valid European Union VAT identification number for the
          ‘Reverse Charge’ mechanism in order to apply.
        </Text>
      }
      footer={
        <Box align="right">
          <Box marginRight="12px">
            <Button priority="secondary">Cancel</Button>
          </Box>
          <Button>Save</Button>
        </Box>
      }
      onCloseButtonClick={() => {}}
    />
  </Cell>

  <Cell>
    <ModalMobileLayout
      content={
        <Text weight="thin" secondary>
          Enter a valid European Union VAT identification number for the
          ‘Reverse Charge’ mechanism in order to apply.
        </Text>
      }
      footer={
        <Box align="right">
          <Box marginRight="12px">
            <Button priority="secondary">Cancel</Button>
          </Box>
          <Button>Save</Button>
        </Box>
      }
      onCloseButtonClick={() => {}}
    />
  </Cell>
</Layout>;
```

#### Sticky Title

```jsx
<div>
  <div style={{ height: '185px' }}>
    <ModalMobileLayout
      content={
        <Text weight="thin" secondary>
          Enter a valid European Union VAT identification number for the
          ‘Reverse Charge’ mechanism in order to apply.
        </Text>
      }
      title={<Text weight="bold">Enter VAT ID</Text>}
      onCloseButtonClick={() => {}}
      stickyTitle
    />
  </div>

  <div style={{ height: '185px' }}>
    <ModalMobileLayout
      content={
        <Text weight="thin" secondary>
          Enter a valid European Union VAT identification number for the
          ‘Reverse Charge’ mechanism in order to apply.
        </Text>
      }
      title={<Text weight="bold">Enter VAT ID</Text>}
      onCloseButtonClick={() => {}}
    />
  </div>
</div>;
```

#### Footer

```jsx
<Layout>
  <Cell>
    <ModalMobileLayout
      title={<Text weight="bold">Enter VAT ID</Text>}
      content={
        <Text weight="thin" secondary>
          Enter a valid European Union VAT identification number for the
          ‘Reverse Charge’ mechanism in order to apply.
        </Text>
      }
      footer={
        <Box align="right">
          <Box marginRight="12px">
            <Button priority="secondary">Cancel</Button>
          </Box>
          <Button>Save</Button>
        </Box>
      }
      onCloseButtonClick={() => {}}
    />
  </Cell>

  <Cell>
    <ModalMobileLayout
      title={<Text weight="bold">Enter VAT ID</Text>}
      content={
        <Text weight="thin" secondary>
          Enter a valid European Union VAT identification number for the
          ‘Reverse Charge’ mechanism in order to apply.
        </Text>
      }
      onCloseButtonClick={() => {}}
    />
  </Cell>
</Layout>;
```

#### Sticky Footer

```jsx
<div>
  <div style={{ height: '185px' }}>
    <ModalMobileLayout
      content={
        <Text weight="thin" secondary>
          Enter a valid European Union VAT identification number for the
          ‘Reverse Charge’ mechanism in order to apply.
        </Text>
      }
      footer={
        <Box align="right">
          <Box marginRight="12px">
            <Button priority="secondary">Cancel</Button>
          </Box>
          <Button>Save</Button>
        </Box>
      }
      onCloseButtonClick={() => {}}
      stickyFooter
    />
  </div>

  <div style={{ height: '185px' }}>
    <ModalMobileLayout
      content={
        <Text weight="thin" secondary>
          Enter a valid European Union VAT identification number for the
          ‘Reverse Charge’ mechanism in order to apply.
        </Text>
      }
      footer={
        <Box align="right">
          <Box marginRight="12px">
            <Button priority="secondary">Cancel</Button>
          </Box>
          <Button>Save</Button>
        </Box>
      }
      onCloseButtonClick={() => {}}
    />
  </div>
</div>;
```

#### Close Button

```jsx
<Layout>
  <Cell>
    <ModalMobileLayout
      title={<Text weight="bold">Enter VAT ID</Text>}
      content={
        <Text weight="thin" secondary>
          Enter a valid European Union VAT identification number for the
          ‘Reverse Charge’ mechanism in order to apply.
        </Text>
      }
      footer={
        <Box align="right">
          <Box marginRight="12px">
            <Button priority="secondary">Cancel</Button>
          </Box>
          <Button>Save</Button>
        </Box>
      }
      onCloseButtonClick={() => {}}
    />
  </Cell>

  <Cell>
    <ModalMobileLayout
      title={<Text weight="bold">Enter VAT ID</Text>}
      content={
        <Text weight="thin" secondary>
          Enter a valid European Union VAT identification number for the
          ‘Reverse Charge’ mechanism in order to apply.
        </Text>
      }
      footer={
        <Box align="right">
          <Box marginRight="12px">
            <Button priority="secondary">Cancel</Button>
          </Box>
          <Button>Save</Button>
        </Box>
      }
    />
  </Cell>
</Layout>;
```

### Common use case examples

#### Default Template

```jsx
<Box width="375px" height="640px" backgroundColor="rgba(22, 45, 61, 0.66)">
  <ModalMobileLayout
    title={<Text weight="bold">Enter VAT ID</Text>}
    content={
      <Text weight="thin" secondary>
        Enter a valid European Union VAT identification number for the ‘Reverse
        Charge’ mechanism in order to apply.
      </Text>
    }
    footer={
      <Box align="right">
        <Box marginRight="12px">
          <Button priority="secondary">Cancel</Button>
        </Box>
        <Button>Save</Button>
      </Box>
    }
    onCloseButtonClick={() => {}}
  />
</Box>;
```

#### Fullscreen Template

```jsx
<Box width="375px" height="640px">
  <ModalMobileLayout
    fullscreen
    onCloseButtonClick={() => {}}
    content={
      <Box direction="vertical" align="center" textAlign="center">
        <Box marginBottom="36px" marginTop="91px">
          <Image src="Illustration.svg" />
        </Box>
        <Box marginBottom="12px">
          <Heading size="extraLarge">Welcome!</Heading>
        </Box>
        <Box marginBottom="36px">
          <Text weight="thin" secondary>
            First impressions count. Apps have one chance to grab a new user’s
            attention. Use it well.
          </Text>
        </Box>
        <Box marginBottom="18px">
          <Button size="large">Start Now</Button>
        </Box>
        <Box marginBottom="91px">
          <TextButton>Learn More</TextButton>
        </Box>
      </Box>
    }
  />
</Box>;
```

## Code

```jsx
import { ModalMobileLayout } from '@wix/design-system';
```

### Props

| 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. |

## Testkit

Import the driver matching your test environment:

```jsx
// UniDriver
import { ModalMobileLayoutUniDriver } from '@wix/design-system/dist/testkit/unidriver';

// Vanilla
import { ModalMobileLayoutTestkit } from '@wix/design-system/dist/testkit';

// Puppeteer
import { ModalMobileLayoutTestkit } from '@wix/design-system/dist/testkit/puppeteer';

// Testing Library
import { ModalMobileLayoutTestkit } from '@wix/design-system/dist/testkit/testing-library';
```

### Driver methods

| 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. |

## Changelog

- **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](invalid-url)) — 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