--- title: Banner description: >- The `Banner` component highlights important information or required actions. Use banners to communicate critical updates, warnings, informational messages, or success notifications that require merchant attention. Banners provide persistent visibility with support for dismissible and non-dismissible states. api_version: 2025-10 api_name: pos-ui-extensions source_url: html: >- https://shopify.dev/docs/api/pos-ui-extensions/latest/polaris-web-components/feedback-and-status-indicators/banner md: >- https://shopify.dev/docs/api/pos-ui-extensions/latest/polaris-web-components/feedback-and-status-indicators/banner.md --- # Banner The `Banner` component highlights important information or required actions. Use banners to communicate critical updates, warnings, informational messages, or success notifications that require merchant attention. Banners provide persistent visibility with support for dismissible and non-dismissible states. ## Properties Configure the following properties on the `Banner` component. * heading string Default: '' The title text displayed prominently at the top of the banner. This is the only property for text content—body text content isn't supported. You can't place `` or other text elements as children. * hidden boolean Default: false Whether the banner is visible or hidden. When set to `true`, the banner will be hidden from view. Use this to programmatically show or hide banners based on app state. * id string A unique identifier for the element used for targeting with CSS, JavaScript, or accessibility features. * tone 'auto' | 'info' | 'success' | 'warning' | 'critical' Default: 'auto' Sets the visual appearance of the banner. The tone determines the color scheme. Available options: * `'auto'` - Lets the system automatically choose the appropriate tone based on context. * `'success'` - Green styling for positive outcomes and successful operations. * `'info'` - Blue styling for general information and neutral updates. * `'warning'` - Orange styling for important notices that require attention. * `'critical'` - Red styling for errors and urgent issues requiring immediate action. ## Slots The `Banner` component supports slots for additional content placement within the banner. Learn more about [using slots](https://shopify.dev/docs/api/polaris/using-polaris-web-components#slots). * primary-action HTMLElement The primary action element displayed within the banner, typically a button. Use this slot to provide interactive elements that allow users to respond to the banner's message, such as "Dismiss," "Learn More," or "Retry" buttons. ### Examples * #### Display important messages with a banner ##### Description Display important messages using a \`Banner\` component with automatic color coding based on message severity. This example shows a basic banner with a heading and descriptive text. ##### Default ```html Dismiss Dismiss Dismiss Dismiss ``` ## Preview ![](https://shopify.dev/images/templated-apis-screenshots/pos-ui-extensions/2025-10/banner-default.png) ## Best practices * **Apply appropriate tones:** Use `critical` for errors requiring immediate action, `warning` for important notices, `success` for confirmations, `info` for general information. * **Keep headings concise:** Write brief headings that clearly communicate the message. Use the collapsible feature for additional detail. * **Show one banner at a time:** Display only one banner to avoid overwhelming the interface. Prioritize by importance. * **Make non-critical banners dismissible:** Allow dismissal for non-critical information. Keep critical alerts non-dismissible until resolved. * **Include clear actions:** If action is needed, use the primaryAction slot to provide clear next steps. * **Use for persistent messages:** Use banners for messages that need to persist. For temporary notifications, consider toast notifications.