Skip to main content

Banner

The Banner component highlights important information or required actions prominently within the POS interface. Use banners to communicate critical updates, warnings, informational messages, or success notifications that require merchant attention in a persistent but non-interruptive way.

The component provides persistent visibility for important messages while remaining non-intrusive to the main workflow, with support for dismissible and non-dismissible states. It includes automatic color coding based on message severity and integrates with the POS design system to maintain visual consistency across different alert types and use cases.

Use cases

  • System alerts: Display alerts about maintenance, outages, or important updates.
  • Error messages: Show critical errors like payment failures or connectivity issues.
  • Success messages: Communicate successful completion of order processing or inventory updates.
  • Informational messages: Present messages about new features, policy changes, or helpful tips.

Show a persistent informational message using a banner. This example demonstrates rendering a banner with different status variants (info, success, warning, critical) to communicate important information to merchants without interrupting their workflow.

Show an information banner

Show an information banner

import React from 'react';
import {
Banner,
ScrollView,
Screen,
reactExtension,
} from '@shopify/ui-extensions-react/point-of-sale';

const SmartGridModal = () => {
return (
<Screen title="Home" name="Home">
<ScrollView>
<Banner
title="Information Banner"
variant="information"
action="Ok"
visible
/>
<Banner
title="Confirmation Banner"
variant="confirmation"
visible
/>
<Banner
title="Alert Banner"
variant="alert"
visible
/>
<Banner
title="Error Banner"
variant="error"
visible
/>
</ScrollView>
</Screen>
);
};

export default reactExtension(
'pos.home.modal.render',
() => <SmartGridModal />,
);

Configure the following properties on the Banner component.

string
required

The title text displayed prominently on the banner. This should be concise and clearly communicate the main message or purpose of the banner to merchants.

required

Controls the visual styling and semantic meaning of the banner. Available options:

  • 'confirmation' - Green styling for positive outcomes, successful operations, and completed actions
  • 'alert' - Orange styling for important notices and situations that require merchant attention
  • 'error' - Red styling for critical errors, failures, and urgent issues requiring immediate action
  • 'information' - Blue styling for general information, neutral updates, and helpful tips
boolean
required

Controls the visibility state of the banner. When set to true, the banner is displayed. When false, it's hidden. Use this to programmatically show or hide banners based on application state or user interactions.

string
Default: 'Dismiss'

The text displayed on the action button within the banner. This provides a clear call-to-action for merchants to address the banner's message. Default is 'Dismiss' if not specified.

boolean
Default: true

Determines whether the action button is visible on the banner. When set to true, the action button is hidden, creating a display-only banner. When false, the action button is shown with the specified action text. Default is true (action button hidden).

() => void
Default: Callback which dismisses the banner

The callback function executed when the banner or its action button is pressed. Use this to handle user interactions such as dismissing the banner, navigating to relevant screens, or triggering specific actions. Default behavior dismisses the banner if not specified.

  • Keep banner content concise and actionable: Banner titles should be brief and clearly communicate the main message. If additional detail is needed, consider providing it through the action button or in a subsequent screen. Avoid overwhelming merchants with too much information in a single banner.
  • Manage banner visibility thoughtfully: Use the visible property to control when banners appear and disappear. Show banners when relevant conditions occur and hide them once the situation is resolved or acknowledged. Avoid leaving stale banners visible that no longer apply to the current context.
  • Provide clear actions when needed: When a banner requires user action, set hideAction to false and provide clear, actionable text for the action button. Make it obvious what steps merchants need to take to address the situation or get more information.
  • Handle banner interactions appropriately: Implement meaningful onPress handlers that either resolve the banner's condition, provide more information, or guide merchants to the appropriate next steps. For simple informational banners, the default dismiss behavior may be sufficient.
  • Limit banner frequency: Avoid showing multiple banners simultaneously or in rapid succession, as this can overwhelm the interface and reduce the effectiveness of important messages. Queue banners appropriately and prioritize critical messages.

  • Banners require explicit visibility management through the visible property—they don't automatically dismiss based on time or user actions unless programmed to do so.
  • The action button functionality is limited to a single action per banner—complex workflows may require navigation to dedicated screens.
Was this page helpful?