search⌘K

Banner

Last Updated: September 2026

Banners are dismissible elements intended to communicate system-wide or local surface-wide information.

Anatomy

link
Dotted grid scale: 8px
  1. 1Icon
  2. 2Content
  3. 3Actions

Variants

link

Info

General system or workflow information.

Success

Positive page-level confirmation.

Warning

Attention required, not necessarily blocking.

Danger

Critical or blocking page-level issue.

With actions

dismissAction (tertiary), action (primary), and optional onClose.

Usage Guidelines

link

When to use

  • •For page-level status that should stay visible across a view.
  • •When a single sentence of messaging is enough.
  • •For system notices, maintenance, or workflow reminders.

When not to use

  • •When you need a title plus longer body — use AlertNotification.
  • •For fleeting confirmations after an action — use Toast.
  • •For unread counts on a control — use AlertBadge.
checkDo

Keep content to one clear sentence and at most one primary action.

closeDon't

Don't pack multi-paragraph content into Banner — use AlertNotification.

checkDo

Match intent to severity so color reinforces the message.

closeDon't

Don't use danger for tips or optional info.

Behaviors

link

Layout

  • •Horizontal layout: icon, content, then actions aligned to the end.
  • •content is a string — not arbitrary React nodes.

Dismissal

  • •onClose shows a close IconButton; caller removes the banner.
  • •dismissAction is a labeled tertiary AlertButton for softer dismiss.

Content Guidelines

link

Copy

  • •One sentence, ideally under ~100 characters.
  • •Lead with the outcome or impact, then the next step if needed.
  • •Use synthetic demo copy only — no real PHI.

Accessibility

link

Text & Labels

  • •content is the primary accessible message.
  • •Action labels must be specific ('Renew authorization', not 'Go').

ARIA attributes

  • •Root uses role="alert".

Keyboard Support

  • •Tab through actions and close.
  • •Space / Enter activate focused controls.

WCAG Compliance Standards

FAQs

link

Banner vs AlertNotification?

Banner is a single content string in a horizontal strip. AlertNotification adds title, description, and a stacked layout.

Can content be JSX?

No — content is a string. Put richer structure in AlertNotification.

Do I need both onClose and dismissAction?

Usually pick one. onClose is an icon; dismissAction is a labeled tertiary button.

link