Status banners with an icon: a neutral information notice and a destructive error notice, each with the right live-region role.
Dependencies
Interaction Type
Press the close button to dismiss the banner. The close button is reachable by keyboard and shows the accent focus ring.
Props
Options you can pass to customize this component.
toneInfo uses the outline style with role status, error uses the destructive color with role alert.
messageNotice text. Each tone has a default.
linkLabelLink text after the message.
hrefWhere the link points.
iconOverrides the tone icon.
openControlled open state.
defaultOpenInitial open state. Defaults to true.
onOpenChangeCalled when the banner is dismissed.
dismissibleShows the dismiss button. Defaults to true.
dismissLabelAccessible label of the dismiss button. Defaults to "Dismiss banner".
Installation
How to use
<BannerNotice tone="info" message="Scheduled maintenance on Friday at 02:00 UTC." />
<BannerNotice tone="error" message="We could not process your last payment." href="/billing" />Source Code
Click the code icon in the top-right corner to view the source code.
License & Usage
// No code loaded.Scheduled maintenance on Friday at 02:00 UTC.Details
We could not process your last payment.Update billing