# OTP input with multiple separators.

> OTP input with multiple separators.

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

- Page, with a live preview: https://shadcn.exchange/r/reui/c-input-otp-3
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/reui/c-input-otp-3-light-8fadc0b9497318c2.png
- Registry item: https://reui.io/r/new-york-v4/c-input-otp-3.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-3.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-3.tsx`

```tsx
"use client"

import { useState } from "react"

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

export function Pattern() {
  const [value, setValue] = useState("123456")

  return (
    <div className="flex items-center justify-center">
      <Field>
        <FieldLabel htmlFor="multi-separator">Multi-Separator</FieldLabel>
        <InputOTP
          id="multi-separator"
          maxLength={6}
          value={value}
          onChange={setValue}
        >
          <InputOTPGroup>
            <InputOTPSlot index={0} />
            <InputOTPSlot index={1} />
          </InputOTPGroup>
          <InputOTPSeparator />
          <InputOTPGroup>
            <InputOTPSlot index={2} />
            <InputOTPSlot index={3} />
          </InputOTPGroup>
          <InputOTPSeparator />
          <InputOTPGroup>
            <InputOTPSlot index={4} />
            <InputOTPSlot index={5} />
          </InputOTPGroup>
        </InputOTP>
      </Field>
    </div>
  )
}
```
