---
title: "Input OTP (BloomInputOtp) — Bloom UI Primitive"
description: "Accessible one-time password / PIN entry with discrete animated slot boxes and separator styling."
category: "Form Controls"
url: "https://bloom-platform-ten.vercel.app/ui/input-otp"
component_name: "BloomInputOtp"
pub_package: "bloom_ui"
cli_command: "bloom ui add input_otp"
last_updated: "2026-08-15"
---

# Input OTP (`BloomInputOtp`)

> Accessible one-time password / PIN entry with discrete animated slot boxes and separator styling.

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

---

## 📦 Installation & Setup

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

### 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
BloomInputOtp(
  length: 6,
  onCompleted: (pin) {
    print('Verified PIN: $pin');
  },
)
```

---

## 🛠️ API Reference

### Properties & Parameters

| Prop | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `length` | `int` | `6` | Number of OTP digits. |
| `onCompleted` | `ValueChanged<String>?` | *Required* | Called when all digits are filled. |
| `onChanged` | `ValueChanged<String>?` | *Required* | Called on every digit change. |

---

## 🎨 Theming & Styling

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

---

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