Banner
Banner is used to highlight important information.
On this page
- @primer/react@37.4.0
- Draft
- Reviewed for accessibility
On this page
Import
import {Banner} from '@primer/react/experimental'
Examples
Props
Banner
Name | Default | Description |
---|---|---|
aria-label | string Provide an optional label to override the default name for the Banner landmark region | |
className | string Provide an optional className to add to the outermost element rendered by the Banner | |
description | React.ReactNode Provide an optional description for the Banner. This should provide supplemental information about the Banner | |
hideTitle | boolean Whether to hide the title visually. | |
icon | React.ReactNode Provide a custom icon for the Banner. This is only available when | |
onDismiss | () => void Optionally 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.ReactNode The 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
No props
Banner.PrimaryAction
No props
Banner.SecondaryAction
No props