Input Otp
A segmented one-time-code input that advances focus automatically and wires a hidden field for form submission.
<.input_otp></.input_otp>
Examples
Default (6 digits)
A standard six-slot OTP input wired to a form field.
<.input_otp id="otp-default" length={6} name="one_time_code" />
Four-digit PIN
Reduce the slot count for short PIN codes.
<.input_otp id="otp-pin" length={4} name="pin" label="PIN code" />
Props
| Name | Type | Default | Values |
|---|---|---|---|
| class | :string | ||
| id | :string | ||
| label | :string | "One-time code" | |
| length | :integer | 6 | |
| name | :string |