Communicates a prominent system-level message at the top of the screen, regardless of the user’s place in the application.
Use the size prop to change the size of the banner.
Use the variant prop to change the visual style of the Banner.
By default, Banner displays an appropriate icon based on the variant prop. You can override this by providing a custom icon using the startContent prop.
You can hide the icon by setting startContent to null.
You can control the banner visibility using the isExpanded and onExpandedChange props.
You can also set the initial visibility using the defaultExpanded prop.
This defaults to true if unset.
Alert has the following slots:
base: The main banner container elementcontent: The content wrapper that contains the startContent and childrenstartContentWrapper: The wrapper around the startContent elementchildrenWrapper: The wrapper around the children elementsdismissButton: The dismiss button elementicon: The icon element within startContent (if default icons are used)