---
title: "Input OTP"
description: "A one-time code input with separate slots, paste support, and groups, for verification codes. Built on input-otp."
plan: Free
docs: https://ui.edbn.me/docs/components/input-otp
---

# Input OTP

A one-time code input with separate slots, paste support, and groups, for verification codes. Built on input-otp.

## Installation

```bash
npx shadcn@4.19.0 add https://ui.edbn.me/r/input-otp.json
```

## Dependencies
- npm: input-otp@^1.5.0, lucide-react@^1.33.0
- edbn: edbn-base

## Usage

```tsx examples/input-otp-basic.tsx
"use client";
import {
  InputOTP,
  InputOTPGroup,
  InputOTPSeparator,
  InputOTPSlot,
} from "@/components/ui/input-otp";

export default function InputOtpBasicPreview() {
  return (
    <InputOTP maxLength={6} aria-label="Verification code">
      <InputOTPGroup>
        {[0, 1, 2].map((index) => (
          <InputOTPSlot key={index} index={index} />
        ))}
      </InputOTPGroup>
      <InputOTPSeparator />
      <InputOTPGroup>
        {[3, 4, 5].map((index) => (
          <InputOTPSlot key={index} index={index} />
        ))}
      </InputOTPGroup>
    </InputOTP>
  );
}
```

## Files
- components/ui/input-otp.tsx (88 lines)

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
