Banner
Dismissible announcement banner with an icon and a message, ready to place at the top of a page.
How to use it
Run npx @blossomui/react add banner, or copy src/components/UI/Banner/Banner.tsx into your React project and import it.
import { Banner } from './components/ui/Banner'Props
BannerProps
| Prop | Type | Description |
|---|---|---|
| label | string | Accessible name of the region. |
| dismissLabel | string | Accessible name of the close button. |
| children (required) | ReactNode | |
| icon | ReactNode | Icon shown inside the round badge. |
| color | BannerColor | (string & {}) | Color of the banner: a preset, `accent` for the brand color (`--blossom-accent`) or any CSS color such as `#0f766e`. |
| dismissible | boolean | Adds a close button; the banner hides itself when it is pressed. Off by default, like in Alert. |
| onDismiss | () => void |