Components · Notifications

Banner

A banner carries a page-wide or system-level message: an outage, planned maintenance, a campaign or a notice to one customer group. It sits at the top and stays until it is closed or the situation changes.

Tokens, sizes, measurements, states and requirements. Values come from the live token package and from Banner.

Design Tokens

Resolved from the live token package. {status} is information, success, warning or danger (Error).

Emphasis

EmphasisBackgroundLeft edgeTextShadow
Strongsurface-{status}-defaultsurface-{status}-weakertext-primary-invertedLarge only
Weaksurface-{status}-weakersurface-{status}-defaulttext-primaryLarge only
Weakersurface-raised-primarysurface-{status}-defaulttext-primaryAlways (elevation-b-20)

Tokens

EmphasisPartTokenValue

Sizes

PropertyDesktop (769px+)Tablet (640–768px)Mobile (below 640px)
Small height48px min40px min40px min
Small padding12px / 16px8px / 16px8px / 16px
Small text14/20, 0.36px; title 14px, 0.56px12/18, 0.24px; title 12px, 0.48px12/18; title 12px
Large left edge8px4px4px
Large icon48px40px24px
Large padding24px16px12px, 12px, 16px (top, sides, bottom)
Large gap icon to text12px12px8px
Large heading / body20/24 / 17/2418/22 / 16/2218/22 / 16/22
Large action indent60px52px32px
Promotion height48px40px32px
Width100% of the container100%100%

Promotion on tablet keeps the mobile layout (title left, link and × right); the Figma heights are 48px desktop and 32px mobile.


Measurements

Dimensions

The padding of a Small and a Large banner. The shaded area is the padding; the status edge sits outside it. The numbers are read from the component.

Breakpoint
A Small and a Large banner. Change the Breakpoint to see the tablet and mobile values.
AttributeDesktop (769px+)Tablet (640–768px)Mobile (below 640px)
Small padding12px above and below, 16px sides8px above and below, 16px sidessame as tablet
Large padding24px16px12px, 12px, 16px (top, sides, bottom)
Large left edge8px4px4px
Large gap icon to text12px12px8px
Large space above the actions24px24px24px
Promotion padding12px above and below, 48px sides4px above and below, 8px sidessame as tablet

Spacing

The same distances as spacing tokens.

PartValue
Small padding, desktopspace-12 and space-16
Small padding, mobilespace-8 and space-16
Large padding, desktopspace-24
Large padding, tabletspace-16
Large padding, mobilespace-12 and space-16
Icon to textspace-8 (Large: space-12 from 640px)
Left edge, Smallspace-2

Elevation

PartTokenValue
Every bannershadow-elevation-b-20Small, Large and Promotion, all emphasis levels. Set once on .banner-notification.

States

Each status in three emphasis levels. A banner has no hover or focus state of its own; only the × and its links do. Choose the level by how much the user must notice it: see Choosing the emphasis.

Size
Breakpoint
StatusStrongWeakWeaker

Typography

ElementTokenMobile and tabletDesktop (769px+)
Small titlelabel-sm, bold, uppercase12/12, 0.48px14/14, 0.56px
Small textbody-sm12/18, 0.24px14/20, 0.36px
Inline link, SmallSmall Bold14/2014/20
Large headingtitle-md18/22, bold20/24, bold
Large bodybody-md16/22, 0.32px17/24, 0.32px
Promotion titlelabel-md14/16, 0.42px18/18, 0.18px
Promotion linkbody-sm / body-md14/16, 0.36px17/24, 0.32px

Structure

Elements

ElementClassNotes
Bannerbanner-notification banner-notification--{status} banner-notification--{emphasis}Emphasis: strong, weak, weaker. Add --large for Large.
Small__base, __left-border, __container, __inner, __contentEdge, container, text row.
Icon, title, text__icon, __title, __textThe icon is a material-symbols-outlined span.
Inline link__linksSmall: between the text and the ×.
Large__main, __textblock, __heading, __body, __footer, __btnsIcon, heading, body, actions.
Promotionbanner-notification--promotion banner-notification--{dark|light|accent-strong|accent-weak}No status. __promo holds the title and the link.
Closeicon-btn icon-btn--closeAdd icon-btn--close-inverted on Strong and Dark.

Types

KindEmphasisStatuses
SmallStrong, Weak, WeakerInformational, Success, Warning, Error
Large (My Pages only)Strong, Weak, WeakerInformational, Success, Warning, Error
PromotionDark, Light, Strong (accent), Weak (accent)None

Width

Always 100% of the container.


Motion

PropertyTokenValue
Close: opacity, height, margin and padding--n-close-durationDefault duration-fast-3 (150ms)
Easing--n-close-easeDefault ease-accelerate-generic
Height collapsedata-n-close="fade" on an ancestor turns it offOn by default

Reduced motion: the banner is hidden at once. Slow durations (450ms or more) and decelerate easings are wrong for an exit. Compare values in the live Motion section on Examples & Guidelines.


Behavior

InputResult
Click ×Hides the banner. Whether the × exists is decided by the banner’s owner.
PersistenceA banner never disappears by itself. It stays until it is closed or the state changes.
TabThe ×, buttons and links take focus with a visible ring.
Inline linkUnderlined when enabled; on hover the underline goes and the color changes (eco-inline-link, Medium; inverted on Strong and Promotion Dark). Brand-accent Promotion keeps its text color on hover.
OrderPlace the banner at the top of the content in the DOM so screen reader users meet it first.

Accessibility Requirements

TopicRequirement
MarkupA Strong or Error banner for an outage should use role="alert"; other banners need no role.
StatusThe icon and the text carry the status, not the color alone (WCAG 1.4.1).
FocusThe ×, buttons and links have a 2px ring, border-focus, on keyboard use (WCAG 2.4.7).
ContrastStrong uses white text on the solid status color; Weak and Weaker use text-primary.
Reduced motionThe banner is hidden without a transition under prefers-reduced-motion: reduce.