Skip to content
Six-box code, light
Light
Six-box code, dark
Dark

Every state

  • Six-box code, default, light
    Six-box code, default, dark

    default

  • Six-box code, focus, light
    Six-box code, focus, dark

    focus

  • Six-box code, partial, light
    Six-box code, partial, dark

    partial

  • Six-box code, filled, light
    Six-box code, filled, dark

    filled

  • Six-box code, error, light
    Six-box code, error, dark

    error

  • Six-box code, disabled, light
    Six-box code, disabled, dark

    disabled

Props

PropTypeDefaultWhat it does
idstring"verification-code"Id of the real input; the label, description and error point at it.
namestring"code"Form field name.
labelstring"Verification code"Visible label.
descriptionstring–Help text under the boxes.
lengthnumber6Number of digits.
defaultValuestring–Starting digits; non-digits are dropped.
errorstring–Error message (e.g. a wrong code); marks every box and clears once the code is edited.
disabledboolean–Disables the field.
autoFocusboolean–Focuses the code on mount.
onComplete(code: string) => void–Fires once every box is filled, by typing, paste or autofill.
classNamestring–Extra classes on the outer Field.

More code inputs

All 4

Preview

Open the page
In UI Pro: get it, €199 once

With every block and theme. 400+ buyers since 2020. Plans