---
title: "Tabs (BloomTabs) — Bloom UI Primitive"
description: "A set of layered sections of content—known as tab panels—that are displayed one at a time. Supports pill and line underline variants."
category: "Layout & Structure"
url: "https://bloom-platform-ten.vercel.app/ui/tabs"
component_name: "BloomTabs"
pub_package: "bloom_ui"
cli_command: "bloom ui add tabs"
last_updated: "2026-08-15"
---

# Tabs (`BloomTabs`)

> A set of layered sections of content—known as tab panels—that are displayed one at a time. Supports pill and line underline variants.

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

---

## 📦 Installation & Setup

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

### 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
BloomTabs<String>(
  defaultValue: 'overview',
  items: const [
    BloomTabItem(value: 'overview', label: Text('Overview'), content: Text('Overview panel')),
    BloomTabItem(value: 'analytics', label: Text('Analytics'), content: Text('Analytics charts')),
    BloomTabItem(value: 'settings', label: Text('Settings'), content: Text('Settings config')),
  ],
)
```

---

## 🛠️ API Reference

**Available Variants:** `defaultVariant (pill)`, `line (underline)`

### Properties & Parameters

| Prop | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `items` | `List<BloomTabItem<T>>` | *Required* | Tab headers and corresponding panel views. |
| `defaultValue` | `T` | *Required* | Initial active tab key. |
| `variant` | `TabsVariant` | `defaultVariant` | Visual style: pill or line. |

---

## 🎨 Theming & Styling

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

---

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