ComponentsInput OTP
Input OTP
atomA one-time-code field — separated single-character cells.
Verify your email
Paste the 6-digit code we sent you.
–
Recipe CSS
This is the exact CSS your kit ships for Input OTP — token-driven, so it re-themes with every knob. Get it (and the rest) from the configurator's Use kit panel.
/* === Input OTP ===
Single-character boxes for one-time codes (2FA, email verification).
Each slot is its own input — focus jumps to the next on type. Visual
pattern: monospace + generous height so digits read clearly. */
.otp {
display: inline-flex;
/* Wrap the slot row instead of overflowing on a narrow viewport (6 × ~40px
slots + gaps exceed a 320px phone). */
flex-wrap: wrap;
gap: var(--k-s-6);
}
.otp__slot {
width: var(--k-in-h-default);
height: var(--k-control-h-lg);
text-align: center;
font-size: var(--k-type-body);
font-family: var(--k-font-mono);
font-weight: var(--k-weight-semibold);
border: max(1.5px, var(--k-bw)) solid var(--k-input-border);
background: var(--k-field-bg);
color: var(--k-fg);
border-radius: var(--k-radius-md);
padding: 0;
transition: border-color var(--k-dur-fast, 120ms) var(--k-ease, ease);
}
.otp__slot:focus {
outline: 2px solid transparent;
outline-offset: 2px;
border-color: var(--k-ring);
box-shadow: 0 0 0 var(--k-ring-w) var(--k-ring-halo);
}
/* Error state — a wrong/expired code reads as danger, like every other field.
* Set aria-invalid="true" on each slot (attribute, not a BEM modifier). */
.otp__slot[aria-invalid="true"] { border-color: var(--k-input-error-border); }
.otp__sep {
align-self: center;
color: var(--k-fg-faint);
font-size: var(--k-type-h3);
margin: 0 var(--k-s-2);
}