---
title: "Alert (BloomAlert) — Bloom UI Primitive"
description: "Displays a callout for user attention with 10x8px padding and soft status tints."
category: "Feedback & Overlays"
url: "https://bloom-platform-ten.vercel.app/ui/alert"
component_name: "BloomAlert"
pub_package: "bloom_ui"
cli_command: "bloom ui add alert"
last_updated: "2026-08-15"
---

# Alert (`BloomAlert`)

> Displays a callout for user attention with 10x8px padding and soft status tints.

**Category:** Feedback & Overlays  
**Package:** [`bloom_ui`](https://pub.dev/packages/bloom_ui)  
**CLI Install:** `bloom ui add alert`  
**Web Preview:** [https://bloom-platform-ten.vercel.app/ui/alert](https://bloom-platform-ten.vercel.app/ui/alert)

---

## 📦 Installation & Setup

### 1. Using Bloom CLI (Recommended)
Add the source code directly to your project without rigid package locks:
```bash
bloom ui add alert
```

### 2. Using Pub.dev Package
Add the dependency to your `pubspec.yaml`:
```yaml
dependencies:
  bloom_ui: ^0.1.0
```

### 3. Import in Dart
```dart
import 'package:bloom_ui/bloom_ui.dart';
```

---

## 🚀 Usage Example

```dart
BloomAlert(
  variant: BloomAlertVariant.info,
  icon: const Icon(Icons.info_outline, size: 16),
  title: const BloomAlertTitle('Heads Up!'),
  description: const BloomAlertDescription('You can add components to your app using the bloom CLI.'),
)
```

---

## 🛠️ API Reference

**Available Variants:** `defaultVariant`, `destructive`, `success`, `warning`, `info`

### Sub-Components & Slots

| Sub-Component | Description |
| :--- | :--- |
| `BloomAlertTitle` | Alert headline text. |
| `BloomAlertDescription` | Detailed explanatory copy. |
| `BloomAlertAction` | Optional trailing action button. |

### Properties & Parameters

| Prop | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `title` | `Widget?` | *Required* | Title slot. |
| `description` | `Widget?` | *Required* | Description body. |
| `variant` | `BloomAlertVariant` | `defaultVariant` | Status color style. |
| `icon` | `Widget?` | *Required* | Optional status icon. |

---

## 🎨 Theming & Styling

BloomAlert automatically respects the active `BloomTheme` (including `BloomTheme.novaLight`, `BloomTheme.novaDark`, etc.) and responds seamlessly to dark mode changes, custom border radii, and brand color tokens.

### Theme Overrides Example
```dart
Theme(
  data: Theme.of(context).copyWith(
    extensions: [
      context.bloomTheme.copyWith(
        colors: context.bloomColors.copyWith(
          primary: const Color(0xFF8B5CF6), // Custom Purple Accent
        ),
      ),
    ],
  ),
  child: BloomAlert(...,
)
```

---

## 🔗 Related Resources
- [Components Gallery](https://bloom-platform-ten.vercel.app/ui)
- [Bloom Theming & Tokens Guide](https://bloom-platform-ten.vercel.app/docs/theming)
- [Application Blocks Catalog](https://bloom-platform-ten.vercel.app/blocks)
- [Bloom CLI Master Overview](https://bloom-platform-ten.vercel.app/docs/cli)
