Sheet
collect_buyer_consent capability to be rendered.The sheet component displays essential information for customers at the bottom of the screen, appearing above other elements. Use it sparingly to avoid distracting customers.
Sheets support a heading, scrollable body content, and action slots for primary and secondary buttons. The library automatically applies the WAI-ARIA Dialog pattern to both the activator and the sheet content.
Sheet requires the collect_buyer_consent capability and is intended for consent-related use cases — it might not render in other contexts. Element positions, padding, spacing, and maximum height are controlled by Shopify.
Supported targets
- customer-account.
footer. render-after - customer-account.
order-index. announcement. render - customer-account.
order-index. block. render - customer-account.
order-status. announcement. render - customer-account.
order-status. block. render - customer-account.
order-status. cart-line-item. render-after - customer-account.
order-status. cart-line-list. render-after - customer-account.
order-status. customer-information. render-after - customer-account.
order-status. fulfillment-details. render-after - customer-account.
order-status. payment-details. render-after - customer-account.
order-status. return-details. render-after - customer-account.
order-status. unfulfilled-items. render-after - customer-account.
order. action. menu-item. render - customer-account.
order. action. render - customer-account.
order. page. render - customer-account.
page. render - customer-account.
profile. addresses. render-after - customer-account.
profile. announcement. render - customer-account.
profile. block. render - customer-account.
profile. company-details. render-after - customer-account.
profile. company-location-addresses. render-after - customer-account.
profile. company-location-payment. render-after - customer-account.
profile. company-location-staff. render-after - customer-account.
profile. payment. render-after
Supported targets
- customer-account.
footer. render-after - customer-account.
order-index. announcement. render - customer-account.
order-index. block. render - customer-account.
order-status. announcement. render - customer-account.
order-status. block. render - customer-account.
order-status. cart-line-item. render-after - customer-account.
order-status. cart-line-list. render-after - customer-account.
order-status. customer-information. render-after - customer-account.
order-status. fulfillment-details. render-after - customer-account.
order-status. payment-details. render-after - customer-account.
order-status. return-details. render-after - customer-account.
order-status. unfulfilled-items. render-after - customer-account.
order. action. menu-item. render - customer-account.
order. action. render - customer-account.
order. page. render - customer-account.
page. render - customer-account.
profile. addresses. render-after - customer-account.
profile. announcement. render - customer-account.
profile. block. render - customer-account.
profile. company-details. render-after - customer-account.
profile. company-location-addresses. render-after - customer-account.
profile. company-location-payment. render-after - customer-account.
profile. company-location-staff. render-after - customer-account.
profile. payment. render-after
Anchor to PropertiesProperties
Configure the following properties on the sheet component.
- Anchor to accessibilityLabelaccessibilityLabelaccessibilityLabelstringstring
A label that describes the purpose of the sheet, announced by assistive technologies. When set, screen readers will use this label instead of the
headingto describe the sheet.- Anchor to defaultOpendefaultOpendefaultOpenbooleanbooleanDefault: falseDefault: false
Whether the sheet should be open when it first renders. Use sparingly — only when the user must interact with the sheet before proceeding (for example, a privacy consent prompt). Only takes effect on the initial render.
- Anchor to headingheadingheadingstringstring
A title that describes the content of the sheet.
- Anchor to idididstringstring
A unique identifier for the element. Use this to reference the element in JavaScript, link labels to form controls, or target specific elements for styling or scripting.
Anchor to EventsEvents
The sheet component provides event callbacks for handling user interactions. Learn more about handling events.
- Anchor to afterhideafterhideafterhideCallbackEventListener<typeof tagName>CallbackEventListener<typeof tagName>
A callback fired when the sheet is hidden, after any hide animations have completed.
- Anchor to aftershowaftershowaftershowCallbackEventListener<typeof tagName>CallbackEventListener<typeof tagName>
A callback fired when the sheet is shown, after any show animations have completed.
- Anchor to hidehidehideCallbackEventListener<typeof tagName>CallbackEventListener<typeof tagName>
A callback fired immediately after the sheet is hidden.
- Anchor to showshowshowCallbackEventListener<typeof tagName>CallbackEventListener<typeof tagName>
A callback fired immediately after the sheet is shown.
CallbackEventListener
A typed event listener for custom element events. The listener receives a `CallbackEvent` with the correct `currentTarget` type for the associated custom element tag.
(EventListener & {
(event: CallbackEvent<TTagName, TEvent>): void;
}) | nullCallbackEvent
An event type that narrows the `currentTarget` to the specific HTML element associated with the custom element tag. This provides type-safe event handling in callback listeners.
TEvent & {
currentTarget: HTMLElementTagNameMap[TTagName];
}Anchor to SlotsSlots
The sheet component supports slots for additional content placement within the component. Learn more about using slots.
- Anchor to primary-actionprimary-actionprimary-actionHTMLElementHTMLElement
The main action button displayed in the sheet footer, representing the primary action users should take. Only accepts a single button component.
- Anchor to secondary-actionssecondary-actionssecondary-actionsHTMLElementHTMLElement
Additional action buttons displayed in the sheet footer, providing alternative or supporting actions.
Anchor to MethodsMethods
The sheet component exposes methods for programmatic control.
- Anchor to hideOverlayhideOverlayhideOverlay() => void() => voidrequiredrequired
A method to programmatically hide the overlay and run any associated hide animations.
Anchor to ExamplesExamples
Anchor to Collect customer consentCollect customer consent
Display a sheet for collecting customer consent. This example presents cookie preferences with accept and reject buttons in the primary-action and secondary-actions slots.
Collect customer consent

html
Anchor to Present privacy policyPresent privacy policy
Let customers manage granular privacy settings. This example displays checkboxes for different cookie categories with save and cancel buttons, using accessibilityLabel to describe the sheet's purpose for screen readers.
html
Anchor to Notify data sale opt-outNotify data sale opt-out
Present a CCPA-style opt-out notice for customers in regions that require data sale controls. This example shows a sheet explaining the customer's rights with opt-out and cancel actions.
html
Anchor to Best practicesBest practices
- Limit to one sheet at a time: Don't stack multiple sheets. If the workflow requires more than one decision, combine them or use a modal for the additional step.
- Reserve for content that requires acknowledgment: Sheets work best when customers need to actively respond before continuing, not for passive informational content.
- Include clear actions: Provide clear primary and secondary actions so customers understand their choices and can respond quickly. The
primary-actionslot supports up to two buttons, and thesecondary-actionsslot supports one button. Keep button labels brief so they don't wrap to more than one line. - Keep content concise: Use short content, small text sizes, or remove the header to avoid scrolling. When content exceeds the maximum height, heading and content become scrollable while the actions slot and dismiss button remain fixed.
- Provide an accessibility label: Use
accessibilityLabelwhen the sheet heading alone doesn't fully describe the purpose for screen readers. - Handle all consent outcomes: When implementing consent flows, handle acceptance (cookies load, sheet doesn't re-appear), denial (cookies don't load, sheet doesn't re-appear), and dismissal (cookies don't load, sheet re-appears on refresh).