# Basic OTP input.

> Basic OTP input.

A shadcn/ui block from the [@reui](https://reui.io) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/reui/c-input-otp-1).

- Page, with a live preview: https://shadcn.exchange/r/reui/c-input-otp-1
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/reui/c-input-otp-1-light-f209fbf1c091bf9e.png
- Registry item: https://reui.io/r/new-york-v4/c-input-otp-1.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://reui.io/r/new-york-v4/c-input-otp-1.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `field`, `input-otp`

## Files

### `c-input-otp-1.tsx`

```tsx
import { Field, FieldLabel } from "@/components/ui/field"
import {
  InputOTP,
  InputOTPGroup,
  InputOTPSeparator,
  InputOTPSlot,
} from "@/components/ui/input-otp"

export function Pattern() {
  return (
    <div className="flex items-center justify-center">
      <Field>
        <FieldLabel htmlFor="simple-otp">Simple OTP</FieldLabel>
        <InputOTP id="simple-otp" maxLength={6}>
          <InputOTPGroup>
            <InputOTPSlot index={0} />
            <InputOTPSlot index={1} />
            <InputOTPSlot index={2} />
          </InputOTPGroup>
          <InputOTPSeparator />
          <InputOTPGroup>
            <InputOTPSlot index={3} />
            <InputOTPSlot index={4} />
            <InputOTPSlot index={5} />
          </InputOTPGroup>
        </InputOTP>
      </Field>
    </div>
  )
}
```
