Components/Overlays/Modal/AnnouncementModalLayout
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/announcementmodallayout
Use this component inside a Modal component to display content in the AnnouncementModalLayout. You may place a title and/or a footer with actions relevant to the displayed content
<MessageModalLayout/> instead.<CustomModalLayout/> instead.A simple example with compact preview
With a Secondary Button action instead of the link.
The basic example with the addition of a footnote
The basic example with a premium skin
The basic example with a help button shown
On mobile, AnnouncementModalLayout should transform to FullScreenModalLayout for promotions.
For smaller, less intrusive promotions you can use Drawer as well
To see the change, toggle 'Enable mobile support' in the top bar of Storybook.
Use AnnouncementModalLayout for Premium feature promotion
| Name | Type | Default | Description |
|---|---|---|---|
actionsSize | "small" | "tiny" | "medium" | "large" | 'medium' | Controls the size of the action buttons. |
children | ReactNode | — | Accepts any item as a child element. For all common cases pass a standard text string. |
closeButtonProps | ModalCloseButtonProps | — | Close button props. |
content | ReactNode | — | Accepts any content to render in the modal body. Children passed directly are treated as content as well. |
contentClassName | string | — | |
dataHook | string | — | Applies a data-hook HTML attribute to be used in the tests. |
footerClassName | string | — | |
footnote | ReactNode | — | Accepts any content to render as a footnote at the bottom of the modal. |
footnoteClassName | string | — | |
footnoteSkin | "light" | "neutral" | — | Sets the look and feel of the footnote. |
headerClassName | string | — | |
helpButtonProps | ModalControlButtonProps | — | Help button props. |
illustration | ReactNode | — | The illustration src or the illustration node itself. |
illustrationClassName | string | — | |
linkOnClick | () => void | — | Defines a callback function which is called when the link is clicked. |
linkText | ReactNode | — | When not provided, the primary link won't be rendered. |
onCloseButtonClick | MouseEventHandler | — | |
onHelpButtonClick | MouseEventHandler | — | |
primaryButtonOnClick | () => void | — | a callback for when the primary action button is clicked. |
primaryButtonProps | Omit<ButtonProps, "internalDataHook"> | — | Passed to the primary action button as props without any filter / mutation. |
primaryButtonText | ReactNode | — | Sets the text of the primary action button. |
primaryButtonTooltipProps | Omit<TooltipProps, "children"> | — | |
secondaryButtonOnClick | () => void | — | callback for when the secondary action button is clicked. |
secondaryButtonProps | Omit<ButtonProps, "internalDataHook"> | — | Passed to the secondary button as props without any filter / mutation. |
secondaryButtonText | ReactNode | — | Sets the text of the secondary action button. |
sideActions | ReactNode | — | Accepts any content to render as the first element on the same row as the action buttons. |
skin | "standard" | "premium" | — | Controls the skin of the modal. It's also applied to the footer buttons and the link. |
style | CSSProperties | — | |
subtitle | ReactNode | — | The modal's subtitle. |
theme | "standard" | "premium" | — | Controls the skin of the modal. |
title | ReactNode | — | The modal's title. |
Import the driver matching your test environment:
| Method | Description |
|---|---|
getLinkText | Returns if the link component text content |
clickLink | Clicks the link component |
getTheme | Gets the modal theme |
getSkin | Gets the modal skin |
clickCloseButton | Clicks the modal close-button |
clickHelpButton | Clicks the modal help-button |
childExists | Checks whether a node with the provided dataHook exists |
getTitleText | Gets the title's text |
getSubtitleText | Gets the subtitle's text |
secondaryButtonDriver | Gets the secondary button driver |
getSecondaryButtonDriver | Gets the secondary button driver |
primaryButtonDriver | Gets the primary button driver |
getPrimaryButtonDriver | Gets the primary button driver |
getPrimaryButtonTooltipContent | Gets the primary button's tooltip content |
getIllustrationSrc | Gets the illustration source |
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. |
Last updated: 21 October 2026