Skip to main content

App Window

The s-app-window component displays a fullscreen modal window. It allows you to open up a page in your app specified by the src property. You can use this when you have larger or complex workflows that you want to display. The app window covers the entirety of the screen. The top bar of the app window is controlled by the admin and allows the user to exit if needed.

Anchor to s-app-window elements-app-window element

The s-app-window element is available for use in your app. It configures a App Window to display in the Shopify Admin.

The content of the app window is specified by the src property and should point to a route within your app.

string
required

The URL of the content to display within the S-App-Window. S-App-Window only supports src-based content (required).

string

A unique identifier for the S-App-Window

Anchor to s-app-window instances-app-window instance

The s-app-window element provides instance properties and methods to control the App Window.

Anchor to content
content
undefined
required

Always returns undefined for s-app-window (src-only)

Anchor to addEventListener
addEventListener
(type: "show" | "hide", listener: EventListenerOrEventListenerObject) => void

Add 'show' | 'hide' event listeners.

Anchor to contentWindow
contentWindow
Window | null

A getter for the Window object of the s-app-window iframe. Only accessible when the s-app-window is open.

() => Promise<void>

Hides the s-app-window element

Anchor to removeEventListener
removeEventListener
(type: "show" | "hide", listener: EventListenerOrEventListenerObject) => void

Remove 'show' | 'hide' event listeners.

() => Promise<void>

Shows the s-app-window element

string

A getter/setter for the s-app-window src URL

Anchor to toggle
toggle
() => Promise<void>

Toggles the s-app-window element between showing and hidden states

Examples

App Window

<s-app-window id="app-window" src="/app-window-content.html"></s-app-window>

<s-button command="--show" commandFor="app-window">Open App Window</s-button>

Preview

Was this page helpful?