Skip to main content

Modal

A modal is a surface that overlays the page’s main content and is used to display information, gather input or confirm actions.

[iOS] Alert

An Alert is a pop-up window that prompts the user for interaction or information within an app interface.


Dos and Don’ts

Do
  • Use alerts in the neutral-alternative variant to display critical information and display urgent messages.
  • Choose variants in brand colours for promotional and non-critical content.
  • Use alerts to drive user input or prompt for decisions.
  • Use alerts for confirmations for important actions.
  • Ensure all content meets AA accessibility standards and is read by assistive technologies.
Don't
  • Don't allow excessive content length. Alerts are for focused tasks, check out the Overlay patterns documentation to see if another component might be more suitable.
  • Don't use alerts for minor notifications.
  • Limit and avoid excessive interruptions.
  • Don’t add crucial information to images.

Anatomy

Anatomy of an Alert.
  1. Header (optional): Adds content to the header. Choose from illustration, image or slot.
  2. Title: Concise heading for clarity.
  3. Body (Optional): Clear description to offer more information/context.
  4. Primary Button: Main action for user interaction. Variant overrides available.
  5. Ghost Button (Optional): Secondary action option. Variant overrides available.
  6. Container: Alerts are in an elevated container.
  7. Footer content (Optional): Ability to add non interactive text below buttons.
  8. Header slot: Content which can be replaced with designed local components.
  9. Body slot (Optional): Content which can be replaced with designed local components.
  10. Footer slot (Optional): Content which can be replaced with designed local components.

Variants

Neutral - alternative

Neutral-alternative variation of the alert component.

02 Orange subtle

Orange subtle variation of the alert component.

03 Cupcake strong

Cupcake strong variation of the alert component.

03 Cupcake subtle

Cupcake subtle variation of the alert component.

04 Berry strong

Berry strong variation of the alert component.

04 Berry subtle

Berry subtle variation of the alert component.

05 Turmeric strong

Turmeric strong variation of the alert component.

05 Turmeric subtle

Turmeric subtle variation of the alert component.

06 Aubergine strong

Aubergine strong variation of the alert component.

06 Aubergine subtle

Aubergine subtle variation of the alert component.

08 Latte strong

Latte strong variation of the alert component.

08 Latte subtle

Latte subtle variation of the alert component.

Usage

Colour

For critical messaging, the Neutral - alternative variant must be used. For non-critical messaging (offers/vouchers/promotions), the variants with coloured backgrounds can be used.

Critical messaging

Alert component in variant neutral-alternative for critical messaging.

Promotional messaging

Alert component in variant cupcake subtle for promotional messaging.

Alignment

Critical messaging should always be left-aligned. Promotional messaging can be center-aligned.

Critical messaging

Alert component with text left-aligned for critical messaging.

Promotional messaging

Alert component with text center-aligned for promotional messaging.

Title prominence

Critical messaging should use default title styling. Promotional messaging can use prominent styling.

Critical messaging

Alert component with default title styling for critical messaging.

Promotional messaging

Alert component with prominent title styling for promotional messaging.

Sizes

The default width of the component is set to 328px, however may be adjusted to fit specific device, ensuring a 16px margin is applied from the edge of the screen.

Please note that the minimum width of the modal component is 288px.

Default

Alert component in default size with 328px width and 16px margin.

Minimum Size

Alert component in minimum size with 288px width.

Modifiers

Emphasis through colour

Depending on the level of visual prominence you want to give to the Modal, you can choose between strong or subtle emphasis.

Strong

Alert component with strong colour emphasis.

Subtle

Alert component with subtle colour emphasis.

Title

Depending on the level of visual prominence you want to give to the title, you can choose between default or prominent emphasis.

Default title

Alert component with default title styling using the typography token Heading M.

Prominent title

Alert component with prominent title styling using the typography token Heading XL italic.

Centre-alignment

You can use centre-alignment to highlight short messages, like titles or brief instructions, enhancing readability and importance. However, longer text or multiple elements may benefit from left-aligned text for better flow.

Alert component with centre-aligned text.

Header content

Illustration

You can use an illustration in the header of an Alert component to add visual context, this can reinforce the alert's purpose and enhance engagement while aligning with the app's design.

Alert component with illustration in the header.

Image

You can use an image in the header of an Alert component to add visual context. This is available either with full bleed or with 16px margin either side.

Full bleed image
Alert component with full bleed image in the header.
Image with margin
Alert component with image in the header and margin.
Image size

There are 3 aspect ratios for imagery within the modal component. Aspect ratios are locked and will keep their height and width properties when resizing the component. There are 3 available sizes/ratios:

The image aspect ration must be consistent across portrait and landscape design as to not distort or stretch the image.

Small (3:1)

Alert component with small image in the header.

Medium (16:9)

Alert component with medium image in the header.

Large (4:3)

Alert component with large image in the header.

Animation

Animation can be used in the header of an Alert component to add visual context. Lottie files will need to be used for implementing this in development; however, GIF animations can be used in Figma files for visual purposes only.

Alert component with animation in the header.

No body

You can use an alert with no body for quick confirmation messages, alerts, notifications or confirmation prompts where the title alone is enough.

Alert component with no body text.

Side by side calls to action

You can use side-by-side calls to action when space is limited or when both actions are equally important. This is often seen in confirmation prompts for efficient interaction, like "OK" and "Cancel".

Please note that this modifier is only available for left-aligned Alerts.
Alert component with side-by-side calls to action.

Single call to action

You can use a single call to action in an alert when there's only one primary action and to simplify user decisions. This is often seen in scenarios without alternative choices.

Alert component with single call to action.

Designers have the option to add non-interactive text below the actions, or they can use a slot to add in other content below the actions. This option will be hidden by default and will be enabled by toggle.

Alert component with footer text.
Alert component with footer slot.

Interactions

Closing the alert

Tapping outside the alert's boundaries will close it, providing an intuitive way to dismiss it without interacting with specific UI elements like calls to action (unless that is otherwise specified by the interaction).

This interaction is enabled by default. Designers need to ask engineers to disabled during in the handover.

Example of an alert closing when tapping outside its boundaries.

Slots available

The purpose of chips is to provide a visual representation of a specific entity or attribute, such as a selected option or a labelled category. Chips can also be interactive, allowing users to remove or modify the selected choices. Chips are commonly used in various contexts, including filtering options, search results or any situation where concise and visually distinct information needs to be displayed.

  1. Header slot: Hidden by default.
  2. Body slot: Available as a variant.
  3. Footer slot: Hidden by default.

Content

Title content

Ensure the title clearly communicates the purpose or topic of the alert. Keep the title brief and to the point, avoiding unnecessary wording. Make sure the title directly relates to the content of the alert, helping users understand its significance. Maintain consistency in tone and style with the rest of the application's UI for a cohesive user experience. Titles have the ability to toggle on and off prominence:

  • Default (Heading M/Narrow)
  • Prominent (Heading XL/Narrow italic)

Body

Provide clear and concise information or instructions that help users understand the context or purpose of the alert. Include only essential details relevant to the user's current task or decision-making process, avoiding unnecessary information.

Calls to action

Clearly label each call to action to indicate its purpose and the outcome of selecting it. Use verbs that prompt immediate action and clearly convey what will happen when the user selects the option. Use language that is familiar and understandable to the target audience, avoiding technical or industry-specific terms that may confuse users.

Use it for non-interactive, secondary information. This includes disclaimers, terms and conditions, legal text, and specific offer restrictions. Do not use it for primary actions or critical messaging. Content here must be purely supplementary and non-essential to completing the main task of the alert.


Overrides

Title overrides

Example of an alert component title using default heading being replaced with heading italic.
  1. Title: Title can be overridden to use any of the Heading font tokens. As a default state, the title will use Heading M / Narrow. When the prominent toggle is engaged, Heading XL / Narrow italic is applied.

Buttons overrides

Example pointing at alert component buttons that can be overridden to use different variants.
  1. Buttons: The Button’s size can be decreased, and their variant can be changed. But all changes must adhere to the button pair guidelines if they are kept as a pair, including the size of both buttons remaining consistent.

Examples

Here’s some examples of an Alert component in context:

LTR examples

Example of an alert component in LTR context.

RTL Examples

Example of an alert component in RTL context.
Back to top