---
title: "Accordion (BloomAccordion) — Bloom UI Primitive"
description: "A vertically stacked set of interactive headings that each reveal a section of content."
category: "Layout & Structure"
url: "https://bloom-platform-ten.vercel.app/ui/accordion"
component_name: "BloomAccordion"
pub_package: "bloom_ui"
cli_command: "bloom ui add accordion"
last_updated: "2026-08-15"
---

# Accordion (`BloomAccordion`)

> A vertically stacked set of interactive headings that each reveal a section of content.

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

---

## 📦 Installation & Setup

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

### 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
BloomAccordion(
  items: const [
    BloomAccordionItem(
      title: 'How do OTA updates work?',
      content: Text('Shorebird downloads Dart AOT patches in the background.'),
    ),
    BloomAccordionItem(
      title: 'Can I copy-paste components?',
      content: Text('Yes! Use the bloom ui CLI to copy source files directly.'),
    ),
  ],
)
```

---

## 🛠️ API Reference

### Properties & Parameters

| Prop | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `items` | `List<BloomAccordionItem>` | *Required* | List of accordion panels. |

---

## 🎨 Theming & Styling

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

---

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