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. Use the hidden property to show or hide a banner programmatically.
Support
Targets (8)
Anchor to Use casesUse cases
- System alerts: Display alerts about maintenance, outages, or important updates.
- Error messages: Show critical errors like payment failures or connectivity issues.
- Success feedback: Communicate successful completion of actions like order processing or sync.
- Warnings: Alert merchants to low inventory, expired payments, or business-critical conditions.
Anchor to PropertiesProperties
Configure the following properties on the banner component.
- stringstringDefault: ''Default: ''
The title of the banner.
- booleanbooleanDefault: falseDefault: false
Determines whether the banner is hidden.
- stringstring
A unique identifier for the element.
- 'auto' | 'info' | 'success' | 'warning' | 'critical''auto' | 'info' | 'success' | 'warning' | 'critical'Default: 'auto'Default: 'auto'
Sets the tone of the banner, based on the intention of the information being conveyed.
Anchor to SlotsSlots
The banner component supports slots for additional content placement within the banner. Learn more about using slots.
- HTMLElementHTMLElement
The action taken when the banner is pressed.
Anchor to ExamplesExamples
Display messages with headings and severity tones. This example shows every tone side by side; in production, show one banner at a time.
Display important messages with a banner

Display important messages with a banner
<s-banner heading="Marked as delivered" tone="success">
<s-button slot="primary-action" onClick={handleDismiss}>Dismiss</s-button>
</s-banner>
<s-banner heading="Ready for shipping" tone="info">
<s-button slot="primary-action" onClick={handleDismiss}>Dismiss</s-button>
</s-banner>
<s-banner heading="Couldn't restock items" tone="warning">
<s-button slot="primary-action" onClick={handleDismiss}>Dismiss</s-button>
</s-banner>
<s-banner heading="Action failed. Contact developer" tone="critical">
<s-button slot="primary-action" onClick={handleDismiss}>Dismiss</s-button>
</s-banner>
Anchor to Best practicesBest practices
- Apply appropriate tones: Use
criticalfor errors requiring immediate action,warningfor important notices,successfor confirmations,infofor general information. - Keep headings concise: Write brief headings that clearly communicate the message.
- Show one banner at a time: Display only one banner to avoid overwhelming the interface. Prioritize by importance.
- Include clear actions: If action is needed, use the
primaryActionslot to provide clear next steps. - Use for persistent messages: Use banners for messages that need to persist. For temporary notifications, consider toast notifications.
Was this page helpful?