Blossom UI

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

PropTypeDescription
labelstringAccessible name of the region.
dismissLabelstringAccessible name of the close button.
children (required)ReactNode
iconReactNodeIcon shown inside the round badge.
colorBannerColor | (string & {})Color of the banner: a preset, `accent` for the brand color (`--blossom-accent`) or any CSS color such as `#0f766e`.
dismissiblebooleanAdds a close button; the banner hides itself when it is pressed. Off by default, like in Alert.
onDismiss() => void

Getting started

  • Introduction
  • Installation
  • Changelog

Customization

  • Colors
  • Brand color
  • Texts and translation

Components

  • Accordion
  • Alert dialog
  • Alerts
  • Avatar
  • Badges
  • Banner
  • Breadcrumb
  • Buttons
  • Calendar
  • Cards
  • Carousel
  • Charts
  • Chip input
  • Collapsible
  • Color picker
  • Combobox
  • Command palette
  • Context menu
  • Copy button
  • Date picker
  • Drawer
  • Dropdown
  • Empty state
  • File upload
  • Footer
  • Forms
  • Hover card
  • Jumbotron
  • KBD
  • Menubar
  • Modal
  • Navbar
  • Navigation menu
  • Number input
  • OTP input
  • Pagination
  • Popover
  • Pricing
  • Progress
  • Rating
  • Resizable panels
  • Scroll area
  • Segmented control
  • Separator
  • Sidebar
  • Skeleton
  • Slider
  • Spinners
  • Stats
  • Stepper
  • Survey
  • Table
  • Tabs
  • Time picker
  • Timeline
  • Timer button
  • Toasts
  • Tooltip
  • Transfer list
  • Tree