# Input OTP (/forms/input-otp)





<ComponentPreview name="input-otp-preskok-demo" description="Six-digit OTP input with separator." />

## Installation [#installation]

```bash
npx shadcn@latest add @preskok/input-otp
```

## Usage [#usage]

```tsx
import { InputOTP } from "@/components/ui/preskok-ui/input-otp"

export function Example() {
  return (
    <InputOTP maxLength={6}>
      <InputOTP.Group>
        <InputOTP.Slot index={0} />
        <InputOTP.Slot index={1} />
        <InputOTP.Slot index={2} />
      </InputOTP.Group>
      <InputOTP.Separator />
      <InputOTP.Group>
        <InputOTP.Slot index={3} />
        <InputOTP.Slot index={4} />
        <InputOTP.Slot index={5} />
      </InputOTP.Group>
    </InputOTP>
  )
}
```
