Usage
The Banner component is used to display important information or announcements at the top of a page.With Actions
Add action buttons to the banner.Colors
Set the banner color with thecolor prop.
Clickable
Make the entire banner clickable by providing ato prop.
Persistence
The banner can remember if it has been dismissed using theid prop. The dismissed state is saved to localStorage.
id prop, the banner will reappear on page reload.
Slots
Customize the banner content using slots.Props
The element or component this component should render as.
A unique id saved to local storage to remember if the banner has been dismissed. Without an explicit id, the banner will not be persisted and will reappear on page reload.
The icon displayed next to the title.
The title text to display in the banner.
Display a list of actions next to the title.
Make the banner clickable by providing a route.
The target attribute for the link (e.g., ‘_blank’).
The color theme of the banner.
Display a close button to dismiss the banner. Can be customized with ButtonProps.
The icon displayed in the close button.
Custom class to apply to the root element.
Override default theme classes.
Slots
Customize the leading content (typically an icon).
title
Customize the title content.
actions
Customize the actions content.
Customize the close button.
Emits
Emitted when the banner is closed.