Forms v1.0.0

Pin Input

Series of single-character inputs for verification codes and OTP entry. Auto-advances focus on entry, supports paste to fill all fields, and backspace navigation between inputs. Combines all values into a hidden input for form submission.

Preview & Code

Options

Name Type Default Description
length Integer 6 Number of input fields (e.g. 4, 6, 8)
type Symbol :numeric Input mode: :numeric or :alphanumeric
masked Boolean false Show dots instead of characters (like a password field)
separator_after Integer nil Show a dash separator after Nth input (e.g. 3 for "123-456")
label String nil Label text rendered above the inputs
hint String nil Hint text rendered below the inputs
error String nil Error message rendered below the inputs
disabled Boolean false Disables all inputs
name String nil Hidden input name for form submission (combined value)
size Symbol :md Input size: :sm, :md, or :lg

Changelog v1.0.0

- Initial release with auto-advance, paste, and backspace navigation
- Hidden input for seamless form submission
- Optional separator dash for grouped codes (e.g. 123-456)
- Masked mode for sensitive inputs
- Three size variants: sm, md, lg
- Dark mode support

Get Full Access

Unlock the source code for this component and all others. One-time payment for lifetime access.

Get Access Now