OTP Component

One-Time Password / PIN input container. Wrap multiple input elements inside .otp to create auto-sized square inputs with centered monospace text.

Notes

Sizes (input-6 ~ input-15)

24px (input-6)

28px (input-7)

32px (input-8, default)

36px (input-9)

40px (input-10)

44px (input-11)

48px (input-12)

52px (input-13)

56px (input-14)

60px (input-15)

Input style variants

Default border

input-subtle (soft background)

input-ghost (transparent)

input-underline (bottom line)

input-outline (thick border)

input-rounded (round corners)

Group (otp-group)

Default border group

Subtle group

Ghost group

Underline group

Outline group

Gutter modifiers

otp-gutter (default: spacing(2))

otp-gutter-1 (spacing(1))

otp-gutter-6 (spacing(6))

otp-gutter-[60px] (custom)

Theme colors

Primary

Secondary

Tertiary

Success

Error

Info

Highlight

Warning

Caution

Ink

Title

Description

Caption

Placeholder

Custom colors

Multiple color formats are supported:

Tailwind colors

Raw / named colors

Digit count

4 digits

6 digits

6 digits (underline)

Interactive JS

Try typing digits, using arrow keys, or pressing Backspace.