← MaV / OTP Input

Variants & States

A single slot in both variants: Empty, Filled, Focus, Error, Disabled. Focus re-themes to lime in dark mode.

BoxedBoxless
Empty
0
Filled
1
1
Focus
1
1
Error
1
1
Disabled
0
0
OTP slot — 48×48px · radius 4px · PJS Medium 18pxBoxed uses --OTP/* · error uses --input-field/error/*

6-digit code

Six slots, 8px gap. Both variants across states.

Boxed
Filled
1
2
3
4
5
6
Focus (entering)
1
2
3
Error
1
2
3
4
5
6
Incorrect code, try again
Disabled
0
0
0
0
0
0
Boxless
Filled
1
2
3
4
5
6
Focus (entering)
1
2
3
0
0
0
Error
1
2
3
4
5
6
Incorrect code, try again
Disabled
0
0
0
0
0
0
6-digit — 6 × 48px slots · 8px gap

4-digit code

Same slots, four positions.

Boxed
Filled
1
2
3
4
Focus (entering)
1
2
Error
1
2
3
4
Boxless
Filled
1
2
3
4
Focus (entering)
1
2
0
0
Error
1
2
3
4
4-digit — 4 × 48px slots

Interactive

Type to fill the boxed variant. Auto-advances; backspace steps back; paste is supported.

Code:
Interactive — 6 slots, one char each, paste-aware

Token Reference

TokenValueUsage
--OTP/default/outline-box#ccccccEmpty border
--OTP/active/outline-box-active#191919Filled border + text
--OTP/focus/outline-box#352effFocus border/underline (→ lime in dark)
--input-field/error/outline-box#ff0000Error border/underline/message
--OTP/disabled/bg-box-disabled#efefefDisabled fill
Slot · Radius · Font48px · 4px · PJS Medium 18pxDimensions