Banner
A full-width notice at the top of a page or window.
Statuses
Use a status alias (info, success, warning, error, or neutral) when the message has a status. It sets the color and the icon. Use a brand color for a message with no status, such as an announcement.
Without a title
Use a banner without a title for a short notice of one line. The icon is optional.
With an action
Use a small button for the action, and ButtonLink for navigation. The action moves below the body in narrow containers.
Dismissible notice
Use a close button when the user does not need the notice again, such as an announcement. The caller controls the dismissed state.
Usage
These are defaults, not laws. Break one when you have a good reason, or when it makes the design more cohesive or more interesting.
- Choose the component from where the message sits and what the user does with it.
Component Use it for Badge A status or category that the user reads, such as Beta. Chip A thing the user can open or act on, such as a person, a filter, or a selected value. Note Context inside content, such as a tip in a docs page. Banner A notice about the whole page, at the top. One at a time. Toast Brief feedback after an action. - Say the meaning in words, because the icon and the color are decorative.
Closeonly callsonDismiss. Remove the banner and remember the dismissal yourself.- A banner is not announced to screen readers. If it appears after a user action, also announce it in a live region.
API
Banner is a site component. Its parts accept standard HTML props unless listed below.
Banner.Root
| Prop | Type | Default | Description |
|---|---|---|---|
| color | ColorName | 'neutral' | 'info' | 'success' | 'warning' | 'error' | 'brand' | 'brand' | A brand color, or a status alias for one. Sets the title strip tint, title color, and icon. |
Banner.Icon
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | Tone icon | Replaces the default status icon. Omit this part to remove the icon. |
Banner.Title
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | – | The optional title in the tinted strip. Accepts div element props. |
Banner.Content
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | – | The notice body. Accepts div element props. |
Banner.Action
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | – | An action beside the body in wide containers. Use a small button. Accepts span element props. |
Banner.Close
| Prop | Type | Default | Description |
|---|---|---|---|
| onDismiss | () => void | – | Called when the user presses Close. |
| aria-label | string | 'Dismiss notice' | Sets the accessible name. |





