Skip to main content

Banner Alert

Announce news or a notice in a strip across the top of a page, loud or quiet, that slides away when dismissed.

View as Markdown

Installation

Component API

PropTypeDefaultDescription
childrenReactNode-The message.
The message.
actionReactNode-A link or button at the message's end.
A link or button at the message's end.
dismissiblebooleantrueAdds a button that slides the banner away.
Adds a button that slides the banner away.
onDismiss() => void-Called once the banner is dismissed, such as to remember it.
Called once the banner is dismissed, such as to remember it.
variantloud | quietloudFilled in the fill color for news, or in the well color for a notice.
Filled in the fill color for news, or in the well color for a notice.
shapenone | roundedrounded
classNamestring-
focusboolean | stringtrue