---
title: "Sonner / Toast (BloomSonner) — Bloom UI Primitive"
description: "An opinionated toast notification system with success, error, warning, and loading status styles."
category: "Feedback & Overlays"
url: "https://bloom-platform-ten.vercel.app/ui/sonner"
component_name: "BloomSonner"
pub_package: "bloom_ui"
cli_command: "bloom ui add sonner"
last_updated: "2026-08-15"
---

# Sonner / Toast (`BloomSonner`)

> An opinionated toast notification system with success, error, warning, and loading status styles.

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

---

## 📦 Installation & Setup

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

### 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
BloomSonner.success(context, 'Release deployed to 12,400 active devices!');
BloomSonner.error(context, 'Build compilation failed. Check logs.');
```

---

## 🛠️ API Reference

### Properties & Parameters

| Prop | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `message` | `String` | *Required* | Toast text message. |
| `action` | `Widget?` | *Required* | Optional action button. |

---

## 🎨 Theming & Styling

BloomSonner 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: BloomSonner.success(context, 'Release deployed to 12,400 active devices!');...,
)
```

---

## 🔗 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)
