Modal

Modals are overlays that prevent merchants from interacting with the rest of the application until a specific action is taken. They can be disruptive because they require merchants to take an action before they can continue interacting with the rest of Shopify. It should be used thoughtfully and sparingly.

Examples

Use as the default option for a modal.

Drag to resize example

Props

children
React.ReactNode
The content to display inside modal (Modal use only)
footer
React.ReactNode
Inner content of the footer (Modal use only)
height
number
Controls the height of the modal (EASDK use only, in pixels)
iFrameName
string
The name of the modal content iframe
instant
boolean
Disable animations and open modal instantly (Modal use only)
large
boolean
Increases the modal width (Modal use only)
limitHeight
boolean
Limits modal height on large sceens with scrolling (Modal use only)
loading
boolean
Replaces modal content with a spinner while a background action is being performed (Modal use only)
openRequired
boolean
Whether the modal is open or not
primaryAction
EASDKAction | ComplexAction
Primary action
secondaryActions
EASDKAction[] | ComplexAction[]
Collection of secondary actions
sectioned
boolean
Automatically adds sections to modal (Modal use only)
src
string
The url that will be loaded as the content of the modal
title
string | React.ReactNode
The content for the title of the modal (EASDK accepts string)
width
"large" | "fullwidth"
Controls the width of the modal (EASDK use only)
onCloseRequired
() => void
Callback when the modal is closed
onIFrameLoad
(evt: SyntheticEvent) => void
Callback when iframe has loaded (Modal use only)
onTransitionEnd
() => void
Callback when modal transition animation has ended (Modal use only)

Modal with primary action

Use to let merchants take a key action.

Modal with primary action on Android

Modal with primary and secondary actions

Use to let merchants take key actions at the bottom of the modal.

Modal with primary and secondary actions on Android

Warning modal

Use to make it clear to the merchant that the action is potentially dangerous. Only use this option when the merchant is about to perform an action that can’t be undone or is difficult to undo.

Warning modal on Android

Modal with primary action

Use to let merchants take a key action.

Modal with primary action on iOS

Modal with primary and secondary actions

Use to let merchants take key actions at the bottom of the modal.

Modal with primary and secondary actions on iOS

Warning modal

Use to make it clear to the merchant that the action is potentially dangerous. Only use this option when the merchant is about to perform an action that can’t be undone or is difficult to undo.

Warning modal on iOS

Content guidelines

Title

Titles should be:

  • Informative and descriptive
    • They should label the type of content grouped in the modal
    • Use a clear {verb}+{noun} question
  • Concise and scannable:
    • Use simple, clear language that can be read at a glance
    • Keep headings to single sentence and avoid using punctuation such as periods, commas, or semicolons
    • Avoid articles (the, a, an) in microcopy headings to keep content short and actionable
    • Written in sentence case (first word capitalized, the rest is lowercase)
  • Edit email address

  • Delete customer?

  • Discard unsaved changes?

  • Edit the email address for this order

  • Are you sure you want to delete customer?

  • Discard?

Body content

Body content should be:

  • Actionable: start sentences with imperative verbs when telling a merchant what actions are available to them (especially something new). Don’t use permissive language like "you can".
  • Notification emails will be sent to this address.

  • This can’t be undone.

  • You can edit the email address where emails will be sent.

  • Are you sure you want to delete the variant Dark Blue Tee/Small/Silk? You cannot reverse this.

  • Structured for merchant success: always put the most critical information first.
  • Clear: use the verb “need” to help merchants understand when they’re required to do something.
  • To buy a shipping label, you need to enter the total weight of your shipment, including packaging.

  • To buy a shipping label, you must enter the total weight of your shipment, including packaging.

Primary and secondary actions

Actions should be:

  • Clear and predictable: merchants should be able to anticipate what will happen when they click a button. Never deceive a merchant by mislabeling an action.
  • Create order

  • Buy shipping label

  • New order

  • Buy

  • Action-led: actions should always lead with a strong verb that encourages action. To provide enough context to merchants use the {verb}+{noun} format on actions except in the case of common actions like Save, Close, Cancel, or OK.
  • Activate Apple Pay

  • View shipping settings

  • Try Apple Pay

  • View your settings

  • Scannable: avoid unnecessary words and articles such as the, an, or a.
  • Add menu item

  • Add a menu item

Footer

Body content should be:

  • Actionable: start sentences with imperative verbs when telling a merchant what actions are available to them (especially something new). Don’t use permissive language like "you can".
  • Notification emails will be sent to this address.

  • You can edit the email address where emails will be sent.

  • Structured for merchant success: always put the most critical information first.
  • Clear: use the verb “need” to help merchants understand when they’re required to do something.
  • To buy a shipping label, you need to enter the total weight of your shipment, including packaging.

  • To buy a shipping label, you must enter the total weight of your shipment, including packaging.