Forms
Input OTP
A row of single-character boxes for a one-time code. Focus moves forward as each box fills.
Group: Forms. Exports: InputOTP. shadcn/ui equivalent: Input OTP (partial parity).
Usage
import { InputOTP } from "./halaska-kit";
InputOTP props
lengthnumber(default 6):valuestring(default ""): The controlled value.onChange(value) => void: Called with the new value.
Accessibility
- Each box is a native input labelled with its position, for example Digit 1 of 6.
- Typing moves focus to the next box, and Backspace on an empty box moves back.
- Pasting a full code fills every box. The boxes ask for a numeric keyboard and one-time-code autofill.
- Any character is accepted. Check the value yourself if you need digits only.
Known gaps
- No separator or grouped slots.
- No pattern restriction, and no disabled or invalid state.
Halaska UI · Components · Patterns · Screens · Install