Blossom UI

Alerts

Alert component with info, success, error, warning and dark colors, outlined and accent variants, icons, lists, actions and a dismiss button.

How to use it

Run npx @blossomui/react add alert, or copy src/components/UI/Alerts/Alert.tsx into your React project and import it.

import { Alert, AlertAction } from './components/ui/Alert'

Props

AlertProps

PropTypeDescription
dismissLabelstringAccessible name of the dismiss button.
colorAlertColor | (string & {})A preset, `accent` for the brand color or any CSS color, for example `#7c3aed`. A custom color is used for the border, the icon and a soft tint of the background.
variant'filled' | 'outlined' | 'accent'`accent` adds a thick border on the left side.
showIconbooleanShow an icon that matches the color.
liststring[]Items rendered as a list below the message.
actionsReactNodeButtons or links rendered below the message.
dismissiblebooleanAdds a close button; the alert hides itself when it is pressed.
onDismiss() => void
children (required)ReactNode

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