Anatomy
Note: Image is not to scale
- Icon - Semantic only
- Text
- App bar
- Button icon
Options
Variants
There are four variants warning
, information
, success
, and error
.
Shadow
Enable shadow by passing shadow
property.
Dismissable
To allow the Alert Banner to be dismissed pass the dismissable
property and add <AlertBanner.Trigger/>
.
Behavior
Text overflow
When the text overflows it will wrap and resize the AlertBanner.
Guidance
When to use shadows
Apply the property shadow
when overlaying content.
Semantic messaging only
The alert banner is strictly for semantic messaging around system status. This means the use of including marketing or other messaging diminishes the effectiveness of semantic messaging.
API Reference
Prop | Description | Type | Default | Required |
---|---|---|---|---|
position | enum fixed | absolute | relative | sticky | ---- | False | |
shadow | enum boolean | true | ---- | False | |
variant | 4 predefined alert banners each tied to our symantic messaging on our site. They are Warning, Information, Success, and Error. | enum error | success | warning | information | information as AlertBannerVariants[variant] | False |
dismissable | The alert banner can be permanent or dismissable. | enum boolean | false | true as AlertBannerVariants[dismissable] | False |