Skip to main content
Pricing

Banner

Free

A full-width, page-level message pinned to the top of the viewport or content area. Banners communicate system-wide information such as maintenance windows, feature announcements, or critical outages. They sit above all other content and optionally include a call-to-action link or dismiss button. Use role="alert" for urgent system alerts and role="status" for informational announcements.

8 variants

Variant
Info banner — Learn more

Variants

VariantDescriptionWhen to use
InfoBlue-toned banner for neutral announcements and feature updates.Use for system announcements — "New feature available", "Scheduled maintenance on Saturday".
WarningAmber-toned banner for conditions that affect the entire application.Use for degraded service, upcoming deadlines, or plan limits — "You have reached 90% of your storage quota".
Promotional

Usage Guidelines

Do

Pin to the top of the viewport so it is impossible to miss.

Don't

Display more than one banner at a time — prioritise the most critical.

Do

Keep the message to a single, concise sentence.

Don't

Use banners for form validation or inline feedback — use Alert or Error Summary.

Do

Include an optional action link for resolution — "Upgrade plan", "View status page".

Don't

Auto-dismiss error banners — they must persist until the condition is resolved.

Do

Use role="alert" for urgent banners and role="status" for informational ones.

Don't

Code

HTML
<div class="lex-banner lex-banner--warning" role="alert">
  <div class="lex-banner__content">
    <svg class="lex-banner__icon" aria-hidden="true">
...
CSS Custom Properties
.lex-banner {
  display: flex;
  align-items: center;
  justify-content: center;
...
React
// Using Lexicon CSS classes with React

<Banner severity="warning" dismissible>
...

Design Tokens

TokenValue (dark)Value (light)CSS property
--lex-banner-bgbg
--lex-banner-texttext
--lex-banner-borderborder
--lex-banner-paddingpadding

Accessibility

  • Use role="alert" for urgent banners (error, warning) to trigger immediate screen reader announcement.
  • Use role="status" for informational banners to announce politely without interruption.
  • Dismiss button requires an accessible label — aria-label="Dismiss banner".
  • Action links within the banner must be keyboard-accessible and clearly labelled.

Keyboard Interactions

TabMoves focus to the action link or dismiss button within the banner.
Enter/SpaceActivates the focused action link or dismiss button.