Six-digit code
A sign-in check with six single-digit boxes split three and three. The button stays an outline until every box is filled.
The code
Plain HTML and CSS on your kit's variables. Put it next to tokens/variables.css from your kit's files and it draws in your look.
<div class="ukc-form-code-check">
<form class="otp" action="#" aria-labelledby="ukc-form-code-check-title">
<span class="seal" aria-hidden="true"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="5" y="11" width="14" height="10" rx="1"/><path d="M8 11V8a4 4 0 0 1 8 0v3"/></svg></span>
<p class="kicker">Marlow Family Clinic</p>
<h3 id="ukc-form-code-check-title">Check your phone</h3>
<p class="lead">We texted a six-digit code to the number ending <b>0187</b>. It works for ten minutes.</p>
<fieldset class="code">
<legend class="sr">Six-digit code</legend>
<input type="text" inputmode="numeric" maxlength="1" placeholder=" " autocomplete="one-time-code" aria-label="Digit 1 of 6" name="ukc-form-code-check-d1" value="4"><input type="text" inputmode="numeric" maxlength="1" placeholder=" " autocomplete="off" aria-label="Digit 2 of 6" name="ukc-form-code-check-d2" value="7"><input type="text" inputmode="numeric" maxlength="1" placeholder=" " autocomplete="off" aria-label="Digit 3 of 6" name="ukc-form-code-check-d3" value="1"><span class="gap" aria-hidden="true"></span><input class="is-next" type="text" inputmode="numeric" maxlength="1" placeholder=" " autocomplete="off" aria-label="Digit 4 of 6" name="ukc-form-code-check-d4" value=""><input type="text" inputmode="numeric" maxlength="1" placeholder=" " autocomplete="off" aria-label="Digit 5 of 6" name="ukc-form-code-check-d5" value=""><input type="text" inputmode="numeric" maxlength="1" placeholder=" " autocomplete="off" aria-label="Digit 6 of 6" name="ukc-form-code-check-d6" value="">
</fieldset>
<p class="left"><span class="todo">Three digits to go</span><span class="full"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg>All six in</span></p>
<button class="go" type="submit">Open my records</button>
<p class="foot">No text yet? <button class="link" type="button">Send a new code</button> or <a href="#">get a call instead</a>.</p>
</form>
</div>
.ukc-form-code-check { position: relative; font-family: var(--uk-font-body, system-ui, sans-serif); color: var(--uk-ink); font-size: 15px; line-height: 1.5;
--tint: color-mix(in srgb, var(--uk-accent) 12%, var(--uk-paper));
--tint-strong: color-mix(in srgb, var(--uk-accent) 22%, var(--uk-paper));
--accent-deep: color-mix(in srgb, var(--uk-accent) 72%, black);
--ink-soft: color-mix(in srgb, var(--uk-ink) 8%, var(--uk-paper));
--line-strong: color-mix(in srgb, var(--uk-ink) 32%, var(--uk-paper));
--danger-tint: color-mix(in srgb, var(--uk-danger) 12%, var(--uk-paper));
--high-tint: color-mix(in srgb, var(--uk-highlight) 28%, var(--uk-paper)); }
.ukc-form-code-check *, .ukc-form-code-check *::before, .ukc-form-code-check *::after { box-sizing: border-box; }
.ukc-form-code-check :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.ukc-form-code-check :where(ul, ol) { padding: 0; list-style: none; }
.ukc-form-code-check :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ukc-form-code-check :where(a) { color: inherit; }
.ukc-form-code-check svg { flex: none; }
.ukc-form-code-check .sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ukc-form-code-check .go, .ukc-form-code-check .ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: var(--uk-radius-md); font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color var(--uk-motion-duration) var(--uk-motion-ease), border-color var(--uk-motion-duration) var(--uk-motion-ease); }
.ukc-form-code-check .go { border: var(--uk-border-width) solid var(--uk-accent); background: var(--uk-accent); color: var(--uk-accent-ink); }
.ukc-form-code-check .go:hover { border-color: var(--accent-deep); background: var(--accent-deep); }
.ukc-form-code-check .ghost { border: var(--uk-border-width) solid var(--line-strong); background: none; color: var(--uk-ink); }
.ukc-form-code-check .ghost:hover { background: var(--ink-soft); }
.ukc-form-code-check :where(button, a, summary):focus-visible { outline: 2px solid var(--uk-accent); outline-offset: 2px; }
.ukc-form-code-check .kicker { font: 500 11px/1.3 var(--uk-font-mono, ui-monospace, monospace); letter-spacing: 0.12em; text-transform: uppercase; color: var(--uk-muted); }
.ukc-form-code-check .otp { max-width: 400px; display: grid; gap: 12px; justify-items: center; padding: 28px 22px 24px; border: var(--uk-border-width) solid var(--uk-line); border-radius: var(--uk-radius-lg); background: var(--uk-surface); box-shadow: var(--uk-card-shadow); text-align: center; }
.ukc-form-code-check .seal { inline-size: 44px; block-size: 44px; display: grid; place-items: center; margin-bottom: 4px; border: var(--uk-border-width) solid var(--uk-ink); border-radius: 50%; background: var(--tint-strong); }
.ukc-form-code-check h3 { margin-top: -6px; font-family: var(--uk-font-display, inherit); font-size: 27px; font-weight: 600; line-height: 1.1; }
.ukc-form-code-check .lead { max-width: 34ch; font-size: 14px; color: var(--uk-muted); }
.ukc-form-code-check .lead b { font: 600 14px var(--uk-font-mono, ui-monospace, monospace); color: var(--uk-ink); }
.ukc-form-code-check .code { display: grid; grid-template-columns: repeat(3, minmax(0, 46px)) 12px repeat(3, minmax(0, 46px)); gap: 6px; align-items: center; justify-content: center; inline-size: 100%; min-width: 0; margin: 6px 0 0; padding: 0; border: 0; }
.ukc-form-code-check .code input { inline-size: 100%; min-width: 0; height: 56px; margin: 0; padding: 0; border: var(--uk-border-width) solid var(--line-strong); border-radius: min(var(--uk-radius-md), 10px); background: var(--uk-paper); font: 600 24px/1 var(--uk-font-mono, ui-monospace, monospace); text-align: center; caret-color: var(--uk-accent); transition: border-color var(--uk-motion-duration) var(--uk-motion-ease), box-shadow var(--uk-motion-duration) var(--uk-motion-ease); }
.ukc-form-code-check .code input:not(:placeholder-shown) { border-color: var(--uk-ink); box-shadow: inset 0 -3px 0 var(--uk-ink); }
.ukc-form-code-check .code input:focus-visible, .ukc-form-code-check .code .is-next:placeholder-shown { outline: none; border-color: var(--uk-accent); box-shadow: 0 0 0 3px var(--tint-strong); }
.ukc-form-code-check .gap { block-size: 2px; background: var(--line-strong); }
.ukc-form-code-check .left { font-size: 13px; color: var(--uk-muted); }
.ukc-form-code-check .full { display: none; align-items: center; gap: 6px; font-weight: 600; color: var(--uk-ink); }
.ukc-form-code-check .otp:not(:has(.code input:placeholder-shown)) .todo { display: none; }
.ukc-form-code-check .otp:not(:has(.code input:placeholder-shown)) .full { display: inline-flex; }
.ukc-form-code-check .go { inline-size: 100%; min-height: 46px; }
.ukc-form-code-check .otp:has(.code input:placeholder-shown) .go { border-style: dashed; border-color: var(--line-strong); background: none; color: var(--uk-ink); }
.ukc-form-code-check .foot { font-size: 13px; color: var(--uk-muted); }
.ukc-form-code-check .link { padding: 0; border: 0; background: none; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ukc-form-code-check .foot a { font-weight: 600; text-underline-offset: 3px; color: var(--uk-ink); }