Skip to main content
Banner lays out a message and optional controls across its container. Use color="blue" for information and color="danger" for errors. The primary variant uses a solid background; secondary uses a translucent background.

Usage

Visibility and announcements

The application owns the message, action handlers, and whether the banner is rendered. Banner has no open state or built-in close button.
Keep the live-region wrapper mounted before updating its message. Use role="alert" only for urgent messages that need immediate attention. The banner itself does not add a live region or forward role and other native attributes.

Props

ReactNode
required
Message and optional actions displayed inside the banner.
string
CSS class applied to the banner.
"blue" | "danger"
default:"blue"
Blue information treatment or danger treatment.
"primary" | "secondary"
default:"primary"
Primary solid treatment or secondary translucent treatment.