PIN input
Enter a short numeric verification code.
Enter the 6-digit code.
Recommended API
| Property or element | Type | Example initial value | Description |
|---|---|---|---|
inputmode and autocomplete | HTML attributes | numeric, one-time-code | Request a numeric keyboard and allow code autofill where available. |
maxlength and pattern | HTML validation | 6, [0-9]{6} | Limit the input to a six-digit code for native form validation. |
States
| State | Trigger | Result |
|---|---|---|
editing | Enter 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
| Variable | Type | Default | Description |
|---|---|---|---|
--q-text | color | #28302a | Main text and foreground color. |
--q-muted | color | #70776f | Color for secondary text. |
--q-font-size | length | 13px | Base size for the component text. |
--q-accent | color | #344e41 | Accent for active controls, indicators and focus. |
--q-surface | color | #ffffff | Surface for controls and cards. |
--q-border | color | #dce0d8 | Color for outlines and dividers. |
--q-radius | length | 10px | Base corner radius. |
--q-gap | length | calc(var(--q-space) * 2) | Space between items, based on the spacing unit. |
--q-control-px | length | calc(var(--q-space) * 4) | Horizontal padding for controls. |
--q-control-py | length | calc(var(--q-space) * 2.5) | Vertical padding for controls. |
--q-space | length | 4px | Base unit for gaps and padding. |