--- title: Popover description: >- Popovers are used to display content in an overlay that can be triggered by a button. api_name: app-home source_url: html: >- https://shopify.dev/docs/api/app-home/polaris-web-components/overlays/popover md: >- https://shopify.dev/docs/api/app-home/polaris-web-components/overlays/popover.md --- # Popover Popovers are used to display content in an overlay that can be triggered by a button. ## Properties * **blockSize** **SizeUnitsOrAuto** **Default: 'auto'** Adjust the block size. * **inlineSize** **SizeUnitsOrAuto** **Default: 'auto'** Adjust the inline size. * **maxBlockSize** **SizeUnitsOrNone** **Default: 'none'** Adjust the maximum block size. * **maxInlineSize** **SizeUnitsOrNone** **Default: 'none'** Adjust the maximum inline size. * **minBlockSize** **SizeUnits** **Default: '0'** Adjust the minimum block size. * **minInlineSize** **SizeUnits** **Default: '0'** Adjust the minimum inline size. ### SizeUnitsOrAuto ```ts SizeUnits | 'auto' ``` ### SizeUnits ```ts `${number}px` | `${number}%` | `0` ``` ### SizeUnitsOrNone ```ts SizeUnits | 'none' ``` ## Events Learn more about [registering events](https://shopify.dev/docs/api/app-home/using-polaris-components#event-handling). * **afterhide** **CallbackEventListener\ | null** * **aftershow** **CallbackEventListener\ | null** * **aftertoggle** **CallbackEventListener\ | null** * **hide** **CallbackEventListener\ | null** * **show** **CallbackEventListener\ | null** * **toggle** **CallbackEventListener\ | null** ### CallbackEventListener ```ts (EventListener & { (event: CallbackEvent): void; }) | null ``` ### CallbackEvent ```ts Event & { currentTarget: HTMLElementTagNameMap[T]; } ``` ## Slots * **children** **HTMLElement** The content of the Popover. Examples ### Examples * #### Code ##### jsx ```jsx <> Product options Import Export ``` ##### html ```html Product options Import Export ``` * #### Popover with notifications ##### Description Popover displaying admin notifications such as new orders, inventory alerts, and payment confirmations, demonstrating how popovers can show informational content without cluttering the main interface. ##### jsx ```jsx <> Notifications New order received Order #1234 was placed 5 minutes ago Low inventory alert 3 products are running low on stock Payment processed $250.00 payment confirmed for order #1230 ``` ##### html ```html Notifications New order received Order #1234 was placed 5 minutes ago Low inventory alert 3 products are running low on stock Payment processed $250.00 payment confirmed for order #1230 ``` * #### Popover with choice list ##### Description Popover containing a choice list and action button demonstrating how popovers can be used for settings and configuration interfaces. ##### jsx ```jsx <> Columns Choose columns to display Sku Inventory Price Vendor Product type Apply changes ``` ##### html ```html Columns Choose columns to display Sku Inventory Price Vendor Product type Apply changes ``` * #### Popover with inventory details ##### Description Popover displaying detailed inventory information using Box padding instead of Section, demonstrating an alternative layout approach for data-focused content. ##### jsx ```jsx <> Stock details Available 127 units Reserved 15 units In transit 50 units Total stock 192 units View full inventory report ``` ##### html ```html Stock details Available 127 units Reserved 15 units In transit 50 units Total stock 192 units View full inventory report ``` ## Usage Popovers are closed by default and should be triggered by a button using the `commandFor` attribute. The button's `commandFor` value should match the popover's `id`. The popover's position is determined by the button that triggers it. ## Best practices * Use for secondary or less important information and actions since they're hidden until triggered * Contain actions that share a relationship to each other * Be triggered by a clearly labeled default or tertiary button ## Content guidelines * Use clear action verbs in the {verb}+{noun} format (e.g., "Create order", "Edit HTML") * Avoid unnecessary words like "the", "an", or "a"