Overlays

Modal

In-iframe modal dialog. Wraps the Polaris <s-modal> web component.

Usage

Open and close with command / commandFor attributes:

<template>
  <ShButton command-for="my-modal" command="--show">Open</ShButton>

  <ShModal id="my-modal" heading="Confirm action">
    <ShParagraph>Are you sure?</ShParagraph>

    <ShButton slot="secondary-actions" command-for="my-modal" command="--hide">
      Cancel
    </ShButton>
    <ShButton
      slot="primary-action"
      variant="primary"
      command-for="my-modal"
      command="--hide"
    >
      Confirm
    </ShButton>
  </ShModal>
</template>

Or control programmatically via the Modal API:

const shopify = useAppBridge()
shopify.modal.show('my-modal')
shopify.modal.hide('my-modal')
shopify.modal.toggle('my-modal')
ShModal renders inside your app's iframe. For a full-screen modal outside the iframe, use ShUiModal.

Props

PropTypeRequiredDefaultDescription
idstringYesModal identifier
headingstringNoModal heading
accessibilityLabelstringNoAccessible label
padding'base' | 'none'NoModal content padding
size'small' | 'small-100' | 'base' | 'large' | 'large-100'NoModal size

Slots

SlotDescription
defaultModal body content
primary-actionPrimary action button
secondary-actionsSecondary action button(s)

Polaris Element

Renders as <s-modal>. See Polaris Modal docs.

© 2026 KiriminAja. Polaris and Shopify are trademarks of Shopify Inc.

KiriminAja not affiliated with Shopify.