Popover
The popover component displays content in an overlay anchored to the button that opens it. Use popover for secondary information and actions that don't need to occupy permanent space on the page.
A popover is closed by default and is opened by a button whose commandFor matches the popover's id. It renders in the browser's top layer, so it escapes the bounds of surrounding containers without any positioning code.
Supported targets
- admin.
abandoned-checkout-details. action. render - admin.
abandoned-checkout-details. block. render - admin.
abandoned-checkout-index. action. render - admin.
app. home. render - admin.
app. intent. render - admin.
catalog-details. action. render - admin.
catalog-details. block. render - admin.
collection-details. action. render - admin.
collection-details. block. render - admin.
collection-index. action. render - admin.
company-details. action. render - admin.
company-details. block. render - admin.
company-location-details. block. render - admin.
customer-details. action. render - admin.
customer-details. block. render - admin.
customer-index. action. render - admin.
customer-index. selection-action. render - admin.
customer-segment-details. action. render - admin.
discount-details. action. render - admin.
discount-details. function-settings. render - admin.
discount-index. action. render - admin.
discount-index. selection-action. render - admin.
draft-order-details. action. render - admin.
draft-order-details. block. render - admin.
draft-order-index. action. render - admin.
draft-order-index. selection-action. render - admin.
gift-card-details. action. render - admin.
gift-card-details. block. render - admin.
order-details. action. render - admin.
order-details. block. render - admin.
order-details. print-action. render - admin.
order-fulfilled-card. action. render - admin.
order-index. action. render - admin.
order-index. selection-action. render - admin.
order-index. selection-print-action. render - admin.
product-details. action. render - admin.
product-details. block. render - admin.
product-details. configuration. render - admin.
product-details. print-action. render - admin.
product-details. reorder. render - admin.
product-index. action. render - admin.
product-index. selection-action. render - admin.
product-index. selection-print-action. render - admin.
product-purchase-option. action. render - admin.
product-variant-details. action. render - admin.
product-variant-details. block. render - admin.
product-variant-details. configuration. render - admin.
product-variant-purchase-option. action. render - admin.
settings. order-routing-rule. render - admin.
settings. validation. render
Supported targets
- admin.
abandoned-checkout-details. action. render - admin.
abandoned-checkout-details. block. render - admin.
abandoned-checkout-index. action. render - admin.
app. home. render - admin.
app. intent. render - admin.
catalog-details. action. render - admin.
catalog-details. block. render - admin.
collection-details. action. render - admin.
collection-details. block. render - admin.
collection-index. action. render - admin.
company-details. action. render - admin.
company-details. block. render - admin.
company-location-details. block. render - admin.
customer-details. action. render - admin.
customer-details. block. render - admin.
customer-index. action. render - admin.
customer-index. selection-action. render - admin.
customer-segment-details. action. render - admin.
discount-details. action. render - admin.
discount-details. function-settings. render - admin.
discount-index. action. render - admin.
discount-index. selection-action. render - admin.
draft-order-details. action. render - admin.
draft-order-details. block. render - admin.
draft-order-index. action. render - admin.
draft-order-index. selection-action. render - admin.
gift-card-details. action. render - admin.
gift-card-details. block. render - admin.
order-details. action. render - admin.
order-details. block. render - admin.
order-details. print-action. render - admin.
order-fulfilled-card. action. render - admin.
order-index. action. render - admin.
order-index. selection-action. render - admin.
order-index. selection-print-action. render - admin.
product-details. action. render - admin.
product-details. block. render - admin.
product-details. configuration. render - admin.
product-details. print-action. render - admin.
product-details. reorder. render - admin.
product-index. action. render - admin.
product-index. selection-action. render - admin.
product-index. selection-print-action. render - admin.
product-purchase-option. action. render - admin.
product-variant-details. action. render - admin.
product-variant-details. block. render - admin.
product-variant-details. configuration. render - admin.
product-variant-purchase-option. action. render - admin.
settings. order-routing-rule. render - admin.
settings. validation. render
Anchor to Use casesUse cases
- Secondary actions: Group related actions behind a single trigger.
- Supporting detail: Show supplementary data without leaving the page.
- Display settings: Let merchants configure what a table or list shows.
- Filtering: Collect filter choices and apply them on confirmation.
Preview
html
Anchor to PropertiesProperties
Configure the following properties on the popover component.
- Anchor to blockSizeblock
Sizeblock Size SizeUnitsOrAutoSizeUnitsOrAutoDefault: 'auto'Default: 'auto' The vertical size of the element in standard layouts (height in left-to-right or right-to-left writing modes).
Block size adjusts based on the writing direction: in horizontal layouts, it controls the height; in vertical layouts, it controls the width. This ensures consistent behavior across different text directions.
Learn more about the block-size property.
: Specific size values in pixels, percentages, or zero for precise control.auto: Automatically sizes based on content and layout constraints.
- Anchor to inlineSizeinline
Sizeinline Size SizeUnitsOrAutoSizeUnitsOrAutoDefault: 'auto'Default: 'auto' The horizontal size of the element in standard layouts (width in left-to-right or right-to-left writing modes).
Inline size adjusts based on the writing direction: in horizontal layouts, it controls the width; in vertical layouts, it controls the height. This ensures consistent behavior across different text directions.
Learn more about the inline-size property.
: Specific size values in pixels, percentages, or zero for precise control.auto: Automatically sizes based on content and layout constraints.
- Anchor to maxBlockSizemax
Block Sizemax Block Size SizeUnitsOrNoneSizeUnitsOrNoneDefault: 'none'Default: 'none' The maximum vertical size of the element in standard layouts (max-height in left-to-right or right-to-left writing modes).
Prevents the element from becoming larger than this size along the block axis.
Learn more about the max-block-size property.
- Anchor to maxInlineSizemax
Inline Sizemax Inline Size SizeUnitsOrNoneSizeUnitsOrNoneDefault: 'none'Default: 'none' The maximum horizontal size of the element in standard layouts (max-width in left-to-right or right-to-left writing modes).
Prevents the element from becoming larger than this size along the inline axis.
Learn more about the max-inline-size property.
- Anchor to minBlockSizemin
Block Sizemin Block Size SizeUnitsSizeUnitsDefault: '0'Default: '0' The minimum vertical size of the element in standard layouts (min-height in left-to-right or right-to-left writing modes).
Prevents the element from becoming smaller than this size along the block axis.
Learn more about the min-block-size property.
- Anchor to minInlineSizemin
Inline Sizemin Inline Size SizeUnitsSizeUnitsDefault: '0'Default: '0' The minimum horizontal size of the element in standard layouts (min-width in left-to-right or right-to-left writing modes).
Prevents the element from becoming smaller than this size along the inline axis.
Learn more about the min-inline-size property.
SizeUnitsOrAuto
Represents size values that can also be set to `auto` for automatic sizing. - `SizeUnits`: Specific size values in pixels, percentages, or zero for precise control. - `auto`: Automatically sizes based on content and layout constraints.
SizeUnits | 'auto'SizeUnits
Represents size values in pixels, percentages, or zero. - `${number}px`: Absolute size in pixels for fixed dimensions (such as `100px`, `24px`). - `${number}%`: Relative size as a percentage of the parent container (such as `50%`, `100%`). - `0`: Zero size, equivalent to no dimension.
`${number}px` | `${number}%` | `0`SizeUnitsOrNone
Represents size values that can also be set to `none` to remove the size constraint. - `SizeUnits`: Specific size values in pixels, percentages, or zero for precise control. - `none`: No size constraint, allowing unlimited growth.
SizeUnits | 'none'Anchor to EventsEvents
The popover component provides event callbacks for handling user interactions. Learn more about handling events.
- Anchor to afterhideafterhideafterhideCallbackEventListener<TTagName> | nullCallbackEventListener<TTagName> | null
A callback fired after the popover is hidden.
- Anchor to aftershowaftershowaftershowCallbackEventListener<TTagName> | nullCallbackEventListener<TTagName> | null
A callback fired after the popover is shown.
- Anchor to aftertoggleaftertoggleaftertoggleCallbackEventListener<TTagName> | nullCallbackEventListener<TTagName> | null
A callback fired after the popover is toggled.
- Anchor to hidehidehideCallbackEventListener<TTagName> | nullCallbackEventListener<TTagName> | null
A callback fired when the popover is hidden.
- Anchor to showshowshowCallbackEventListener<TTagName> | nullCallbackEventListener<TTagName> | null
A callback fired when the popover is shown.
- Anchor to toggletoggletoggleCallbackEventListener<TTagName> | nullCallbackEventListener<TTagName> | null
A callback fired when the popover is toggled.
CallbackEventListener
A function that handles events from UI components. This type represents an event listener callback that receives a `CallbackEvent` with a strongly-typed `currentTarget`. Use this for component event handlers like `click`, `focus`, `blur`, and other DOM events.
(EventListener & {
(event: CallbackEvent<T>): void;
}) | nullCallbackEvent
An event object with a strongly-typed `currentTarget` property that references the specific HTML element that triggered the event. This type extends the standard DOM `Event` interface and ensures type safety when accessing the element that fired the event.
Event & {
currentTarget: HTMLElementTagNameMap[T];
}Anchor to SlotsSlots
The popover component supports slots for additional content placement within the component. Learn more about using slots.
- Anchor to childrenchildrenchildrenHTMLElementHTMLElement
The content displayed within the popover component, which appears in an overlay positioned relative to its trigger element.
Anchor to ExamplesExamples
Group related actions behind a single trigger. This example shows a button that opens a popover containing tertiary import and export actions.
Preview
html
Anchor to Display a notification listDisplay a notification list
Surface recent activity without navigating away. This example shows a notification button that opens a popover listing three updates separated by dividers.
Preview
html
Anchor to Configure table display optionsConfigure table display options
Let merchants choose which columns a table shows. This example shows a settings button that opens a popover with a choice list and a primary button to apply the selection.
Preview
html
Anchor to Show inventory detailsShow inventory details
Expand on a value shown elsewhere on the page. This example shows an info button that opens a popover breaking stock down into available, reserved, and in-transit quantities.
Preview
html
Anchor to Filter with apply and clearFilter with apply and clear
Collect filter choices and close the popover once the merchant confirms. This example sets inlineSize for a wider overlay and closes it from buttons that target the popover with command="--hide".
Preview
html
Anchor to Best practicesBest practices
- Reserve popovers for secondary content: Primary content and primary actions belong on the page. Use a popover for detail or actions that only some merchants need, some of the time.
- Trigger on press, never on hover: A popover manages focus and returns it to the activator on close, which hover activation breaks. If you want content to appear on hover, use tooltip instead.
- Label the activator with the content: Name the button after what opens, using the
{verb}+{noun}format or a plain noun like Columns. Avoid vague triggers like More or Options. - Use a default or tertiary button as the trigger: A primary button signals the main action on the page, which a popover isn't.
- Close the popover after a confirming action: When a popover collects input, have the confirming button target it with
command="--hide"so the merchant isn't left dismissing it manually. - Size only when the content needs it: The popover sizes to its content by default. Reach for
inlineSizeormaxBlockSizeonly when the default is genuinely too narrow or too tall.
Anchor to LimitationsLimitations
- Popovers render in the top layer and reposition to stay within the viewport, but in very constrained spaces the overlay can still be cut off. Prefer compact content.
- Size properties accept fixed values such as
250pxor50%. They aren't responsive, so a size that suits a wide viewport can crowd a narrow one. - The activator relationship is established by
commandFormatching the popover'sid. If theidis missing, duplicated, or the popover isn't in the document, the trigger silently does nothing. - A popover isn't a modal. It doesn't trap focus or block interaction with the rest of the page, so don't use it for content that must be acknowledged.