Components
Components
InputOTP
Segmented one-time code entry with paste and keyboard navigation.
newfree
Install
@hewnui/ui · hewnui
Compositional OTP control for email codes and short PINs. Digits advance on entry, Backspace retreats, and paste fills the whole code.
Email code
Paste works across all digits.
Backup PIN
That code expired.
Usage
States
- Description helper text
- Invalid +
errorMessage - Disabled
- Controlled
valueordefaultValue
Accessibility
- Group role with labeled digit slots
- Arrow keys move between digits
- Hidden
nameinput for form submission when provided
API reference
Props for InputOtp from @hewnui/ui/input-otp. Generated from component types — not hand-written.
Prop
Type