Banner

A message at the top of a page or a section, which stays until it is dealt with. Anything the user has to act on belongs here rather than in a Toast, which disappears on a timer.

Reach for it

A message about the page or the section that stays until it is dealt with.

Not for

Something transient. That is a Toast.

Intents

The intent is the meaning, and the theme decides the colour. Neutral carries information the user did not ask for, and danger is for something already broken rather than something that might break.

Banner: neutral

Persistent, so it suits anything the user has to act on.

Banner: info

Persistent, so it suits anything the user has to act on.

Banner: success

Persistent, so it suits anything the user has to act on.

Banner: warning

Persistent, so it suits anything the user has to act on.

Banner: danger

Persistent, so it suits anything the user has to act on.

Quieter, and with an action

isSubdued keeps the meaning and drops the emphasis, for a banner inside a card or a form rather than at the top of a page. Actions sit in a row the banner draws, so their placement is not a decision each caller makes again.

Two direct debits were refused

Same meaning, quieter surface.

Without a description

The description is optional. The title row is as tall as the icon, so a single line sits on the same axis as the icon.

Banner without a description: neutral

Banner without a description: info

Banner without a description: success

Banner without a description: warning

Banner without a description: danger

Without a description, and with an action

API reference

Banner

PropTypeDefaultDescription
title*string-
data-testidstring-Names the element for a test. Never rendered, never announced.
intent'neutral' | 'info' | 'success' | 'warning' | 'danger'neutral
isSubduedbooleanfalse
descriptionstring-
markerReactNode-Replaces the default intent glyph, for a logo or an app's own icon.
actionsReactNode-Actions, kept as a slot so their order stays the caller's choice.