Skip to content

PIN Input

One input per character for PINs and one-time codes: typing moves on, paste and SMS autofill spread over the positions.

Styled with CSS Tailwind

One-time code

Otp puts autocomplete="one-time-code" on the first position, so phones offer the code from a text message; a pasted code spreads over the positions. The group is one tab stop - the first empty position - and ← / →, Home / End and Backspace move between positions. OnComplete fires once every position is filled.

Value:

Masked PIN with placeholders

Mask renders password inputs and Placeholder marks the empty positions. Characters the Type doesn't allow (here: anything but digits) are refused as they are typed.

Alphanumeric, upper case, in a field

Type="BitBhPinInputType.Alphanumeric" with UpperCase takes ticket or licence codes; a Pattern (one character's regular expression) takes anything else. Inside a BitBhField the label names the group and focuses its first empty position.

An unhandled error has occurred. Reload 🗙