Banners prominently communicate contextual information.
Banners are used to communicate important information about the current page or workflow in a non-modal fashion. We encourage using Banners in workflow-, page-, and system-level contexts to display status changes, warnings, or feature announcements.
In the case of form validation, use the available inline error messages instead.
Banners and Snackbars are similar components aimed at communicating information to the user somewhere on the current page. It's important to note the different use cases for each and the components are not interchangeable:
Select the Banner variant that best matches the intended semantic meaning of the message. Refrain from using Banners to match a particular theme or color scheme.
When enabling dismissal, allow users the option to dismiss Banners for issues that are not considered critical to address. The dismiss button can either be a dismiss action button, or an icon-only close button. Be aware that it's not possible to enable both at once.
Consider the use case. If a Banner presents information that can be addressed at any time, provide dismissal buttons. If a Banner communicates an issue that must be resolved, make it persistent.
When a Banner requires a call-to-action, limit use to one primary action. If necessary, include a dismiss action.
Inline Banners expand to the full width of their parent container and are embedded within the page flow. Use them for contextual messages tied to the surrounding content.
Alert Banners are elevated banners used to communication information about the entire page.
Announcements are full-width Banners used for application-wide messages such as maintenance notices or feature launches.
Each variant of the Banner comes with a different visual treatment in background and border color. Variants are meant to represent consistent semantic meanings
Neutral Banners are used for general-purpose tips and guidance.
Information Banners add helpful context and tips the user may be unaware of.
Success Banners confirms a positive outcome such as a process completing successfully.
Warning Banners inform the user of an issue that may require their attention.
Error Banners inform the user of a critical error or issue that must be addressed immediately.
Feature Banners promote newly available features or system updates.
Outlined Banners use a colored border instead of a filled background color to communicate its semantic meaning. Use outlined Banners for a more subtle visual treatment within the UI.
Default filled Banners provide stronger visual prominence.
Outlined Banners use borders instead of background color to convey semantic meaning.
The base Banner's close button uses default styles with no user interaction.
A disabled close button cannot be interacted with.
A disabled dismiss button cannot be interacted with.
The primary action automatically shows a loading indicator until background processes are complete.
Banners are inherently responsive. Actions will wrap under the main content when the Banner's container is 576px or less.
Actions wrap below the content when the Banner container is narrower than 576px.
Banners can be dismissed one of two ways: with an icon-only close button or with a dismiss action. Only one can be enabled at any given time.
Icon-only buttons can be used for quick dismissal.
A dismiss button exists alongside the primary action.
Action button labels should clearly describe the button's action, similarly to buttons. Use a single verb or verb phrase.
Banner titles should summarize the intended message in a few strong words written in sentence case. They are bolded to catch the user's eye. As titles aren't required, we recommend not relying on them as the sole provider of information.
Descriptions should support the title with supplementary detail. They may be used without a title.
Match each variant's tone to its semantic use. Error and warning Banners should be direct and factual. Feature and information Banners can be more conversational.