Back to library

PIN input

Enter a short numeric verification code.

Enter the 6-digit code.

Recommended API

Property or elementTypeExample initial valueDescription
inputmode and autocompleteHTML attributesnumeric, one-time-codeRequest a numeric keyboard and allow code autofill where available.
maxlength and patternHTML validation6, [0-9]{6}Limit the input to a six-digit code for native form validation.

States

StateTriggerResult
editingEnter a verification code.The text field preserves digits such as leading zeros.

Svelte implementation guidance

Enter up to six characters in one text field. A numeric keyboard is requested and the pattern participates in form validation; neither filters typed characters.

Use the supplied svelte example as a starting point. Preserve the native control semantics, labels, keyboard behavior and project conventions. Verify with keyboard and the target browser.

CSS variables

VariableTypeDefaultDescription
--q-textcolor #28302aMain text and foreground color.
--q-mutedcolor #70776fColor for secondary text.
--q-font-sizelength 13pxBase size for the component text.
--q-accentcolor #344e41Accent for active controls, indicators and focus.
--q-surfacecolor #ffffffSurface for controls and cards.
--q-bordercolor #dce0d8Color for outlines and dividers.
--q-radiuslength 10pxBase corner radius.
--q-gaplength calc(var(--q-space) * 2)Space between items, based on the spacing unit.
--q-control-pxlength calc(var(--q-space) * 4)Horizontal padding for controls.
--q-control-pylength calc(var(--q-space) * 2.5)Vertical padding for controls.
--q-spacelength 4pxBase unit for gaps and padding.