---
title: "Checkbox (BloomCheckbox) — Bloom UI Primitive"
description: "A 16x16px control that allows the user to toggle between checked, unchecked, and indeterminate states."
category: "Form Controls"
url: "https://bloom-platform-ten.vercel.app/ui/checkbox"
component_name: "BloomCheckbox"
pub_package: "bloom_ui"
cli_command: "bloom ui add checkbox"
last_updated: "2026-08-15"
---

# Checkbox (`BloomCheckbox`)

> A 16x16px control that allows the user to toggle between checked, unchecked, and indeterminate states.

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

---

## 📦 Installation & Setup

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

### 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
BloomCheckbox(
  checked: true,
  label: const Text('Accept terms and privacy policy'),
  description: const Text('You agree to our automated telemetry guidelines.'),
  onChanged: (val) {
    print('Checked: $val');
  },
)
```

---

## 🛠️ API Reference

### Properties & Parameters

| Prop | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `checked` | `bool?` | *Required* | Controlled checked state (null = indeterminate). |
| `label` | `Widget?` | *Required* | Optional adjacent label text. |
| `description` | `Widget?` | *Required* | Optional subtext description. |
| `onChanged` | `ValueChanged<bool?>?` | *Required* | Callback when toggled. |

---

## 🎨 Theming & Styling

BloomCheckbox 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: BloomCheckbox(...,
)
```

---

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