Banner API
View componentThe full prop reference for the Banner component. A full-width, site-level announcement bar with variants, an optional action, and a dismiss button.
Import
tsx
import { Banner } from '@structyl/styled';Props
Banner
A full-width, site-level announcement bar with tone variants, an optional leading icon and trailing action, and a dismiss button. Extends the native div element.
| Prop | Type | Default |
|---|---|---|
| variant# | 'default' | 'info' | 'success' | 'warning' | 'error' | 'brand'Visual tone. 'brand' uses the primary color fill. | 'default' |
| align# | 'start' | 'center'Content alignment within the bar. | 'start' |
| icon# | React.ReactNodeLeading icon rendered before the content. | — |
| action# | React.ReactNodeTrailing action (e.g. a link or button) rendered after the content. | — |
| dismissible# | booleanShow an accessible dismiss button. | false |
| onDismiss# | (() => void) | undefinedCalled when the dismiss button is clicked. | — |
Source code
If you didn't find what you need here, read the component implementation .