--- title: Banner description: >- The banner component highlights important information or required actions prominently within the interface. Use banner to communicate statuses, provide feedback, draw attention to critical updates, or guide users toward necessary actions. api_version: 2026-04 api_name: customer-account-ui-extensions source_url: html: >- https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/feedback-and-status-indicators/banner md: >- https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/feedback-and-status-indicators/banner.md --- # Banner The banner component highlights important information or required actions prominently within the interface. Use banner to communicate statuses, provide feedback, draw attention to critical updates, or guide users toward necessary actions. Banners support multiple tones to convey urgency levels, optional actions for next steps, and can be positioned contextually within sections or page-wide at the top. For inline status indicators on individual items, use [badge](https://shopify.dev/docs/api/customer-account-ui-extensions/latest/web-components/feedback-and-status-indicators/badge). ### Support Targets (24) ### Supported targets * [customer-account.​footer.​render-after](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/footer#footer-render-after-) * [customer-account.​order-index.​announcement.​render](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/order-actions#order-index-announcement-) * [customer-account.​order-index.​block.​render](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/order-actions#order-index-block-) * [customer-account.​order-status.​announcement.​render](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/order-status#order-status-announcement-) * [customer-account.​order-status.​block.​render](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/order-status#order-status-block-) * [customer-account.​order-status.​cart-line-item.​render-after](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/order-status#cart-line-item-render-after-) * [customer-account.​order-status.​cart-line-list.​render-after](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/order-status#cart-line-list-render-after-) * [customer-account.​order-status.​customer-information.​render-after](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/order-status#customer-information-render-after-) * [customer-account.​order-status.​fulfillment-details.​render-after](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/fulfillment-status#fulfillment-status-targets) * [customer-account.​order-status.​payment-details.​render-after](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/payments-and-returns#payments-and-returns-targets) * [customer-account.​order-status.​return-details.​render-after](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/payments-and-returns#return-details-render-after-) * [customer-account.​order-status.​unfulfilled-items.​render-after](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/fulfillment-status#unfulfilled-items-render-after-) * [customer-account.​order.​action.​menu-item.​render](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/order-actions#order-action-menu-item-) * [customer-account.​order.​action.​render](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/order-actions#order-action-) * [customer-account.​order.​page.​render](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/full-page#order-specific-full-page-) * [customer-account.​page.​render](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/full-page#customer-account-full-page-) * [customer-account.​profile.​addresses.​render-after](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/profile-page-default#profile-page-default-targets-) * [customer-account.​profile.​announcement.​render](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/profile-page-default#profile-announcement-) * [customer-account.​profile.​block.​render](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/profile-page-default#profile-block-) * [customer-account.​profile.​company-details.​render-after](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/profile-page-b2b#profile-page-b2b-targets-) * [customer-account.​profile.​company-location-addresses.​render-after](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/profile-page-b2b#company-location-addresses-render-after-) * [customer-account.​profile.​company-location-payment.​render-after](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/profile-page-b2b#company-location-payment-render-after-) * [customer-account.​profile.​company-location-staff.​render-after](https://shopify.dev/docs/api/customer-account-ui-extensions/2026-04/targets/profile-page-b2b#company-location-staff-render-after-) * customer-account.​profile.​payment.​render-after #### Use cases * **Payment errors**: Alert customers to payment failures or verification issues that require immediate action. * **Order updates**: Inform customers about changes to their orders, such as shipping delays or item substitutions. * **Subscription reminders**: Warn customers about upcoming renewals, expiring payment methods, or plan changes. * **Success confirmations**: Confirm that an action like updating an address or redeeming a reward completed successfully. *** ## Properties Configure the following properties on the banner component. * **collapsible** **boolean** **Default: false** Whether the banner content can be collapsed and expanded by the user. A collapsible banner conceals child elements initially, allowing the user to expand the banner to reveal them. * **dismissible** **boolean** **Default: false** Whether the banner displays a close button that allows users to dismiss it. When the close button is pressed, the `dismiss` event will fire, then `hidden` will be set to `true`, any animation will complete, and the `afterhide` event will fire. * **heading** **string** **Default: ''** The heading text displayed at the top of the banner to summarize the message or alert. * **hidden** **boolean** **Default: false** Controls whether the banner is visible or hidden. When using a controlled component pattern and the banner is `dismissible`, update this property to `true` when the `dismiss` event fires. You can hide the banner programmatically by setting this to `true` even if it's not `dismissible`. * **id** **string** 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. * **tone** **'info' | 'auto' | 'success' | 'warning' | 'critical'** **Default: 'auto'** The semantic meaning and color treatment of the component. The banner is a live region and the type of status is dictated by the tone selected. * `info`: Informational content or helpful tips. * `auto`: Automatically determined based on context. * `success`: Positive outcomes or successful states. * `warning`: Important warnings about potential issues. * `critical`: Urgent problems or destructive actions. The `critical` tone creates an [assertive live region](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/alert_role) that is announced by screen readers immediately. The `info`, `success`, and `warning` tones create an [informative live region](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/status_role) that is announced by screen readers after the current message. ### Events The banner component provides event callbacks for handling user interactions. Learn more about [handling events](https://shopify.dev/docs/api/polaris/using-polaris-web-components#handling-events). * **afterhide** **CallbackEventListener\** A callback that fires when the banner has fully hidden, including after any hide animations have completed. The `hidden` property is `true` when this event fires. * **dismiss** **CallbackEventListener\** A callback that fires when the banner is dismissed by the user clicking the close button. This doesn't fire when setting `hidden` manually. The `hidden` property is `false` when this event fires. ### 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. ```ts (EventListener & { (event: CallbackEvent): void; }) | null ``` ### CallbackEvent 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. ```ts TEvent & { currentTarget: HTMLElementTagNameMap[TTagName]; } ``` *** ## Examples ### Display a basic notification Display a basic notification to the customer. This example renders an `s-banner` with an `info` tone and a heading to communicate a free shipping promotion. ## Display a basic notification ![An informational banner with a blue info icon and the text Free shipping on all orders.](https://shopify.dev/assets/assets/images/templated-apis-screenshots/checkout-ui-extensions/2025-10/banner-default-DUI7koDV.png) ## html ```html ``` ### Show a dismissible banner Let customers dismiss informational banners after reading them. This example uses the `dismissible` property to add a close button that hides the banner when pressed. ## html ```html ``` ### Present a collapsible warning Use a collapsible banner to show a warning title with additional details hidden by default. This example warns about an expiring payment method and reveals instructions when expanded. ## html ```html Update your payment method before April 1 to avoid interruption to your subscription. ``` *** ## Best practices * **Use banners sparingly**: Too many banners distract customers from the main content. Reserve them for the most important information. * **Place banners contextually**: Display banners at the top of a page or section, below the relevant header. If a banner relates to specific content, place it near that content. * **Include a next step when possible**: Add a button with a clear action so customers know what to do after reading the message. * **Make banners dismissible unless critical**: Customers should be able to dismiss informational banners. Keep `critical` banners persistent until the issue is resolved. * **Match tone to urgency**: Use `info` for general updates, `warning` for issues needing attention, `success` for confirmations, and `critical` for problems that block progress. ***