Banner
Banner is used to highlight important information.
Page navigation navigation
React examples
Default
Info
Tone variants
Banners can be used to convey different tones of information. Choose the correct variant for your use-case.
Critical
Dismissible
Info
With actions
Info
Visually hidden title
The Banner's title is still accessible to assistive technologies, but is visually hidden.
Info
More code examples
See the Banner Storybook stories.
Props
Banner
| Name | Default | Description |
|---|---|---|
aria-label | stringProvide an optional label to override the default name for the Banner landmark region | |
className | stringProvide an optional className to add to the outermost element rendered by the Banner | |
description | React.ReactNodeProvide an optional description for the Banner. This should provide supplemental information about the Banner | |
hideTitle | booleanWhether to hide the title visually. | |
icon | React.ReactNodeProvide a custom icon for the Banner. This is only available when | |
onDismiss | () => voidOptionally provide a handler to be called when the banner is dismissed. Providing this prop will show a dismiss button | |
primaryAction | React.ReactNode | |
secondaryAction | React.ReactNode | |
title | React.ReactNodeThe title for the Banner. This will be used as the accessible name and is required unless | |
variant | 'critical' | 'info' | 'success' | 'upsell' | 'warning' |
Banner.Title
| Name | Default | Description |
|---|---|---|
as | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' |
Banner.Description
| Name | Default | Description |
|---|---|---|
className | stringClass name(s) for custom styling. |