Card details, one frame
Card number, expiry and security code in one joined frame, each with its own small label. The expiry is wrong, so its cell is boxed, flagged and explained.
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-input-card-details">
<fieldset class="pay">
<legend>Card details</legend>
<p class="hint">Invoice 20418, dental check for Biscuit. $184.50</p>
<div class="frame">
<div class="cell num"><label for="ukc-input-card-details-n">Card number</label><input id="ukc-input-card-details-n" type="text" inputmode="numeric" autocomplete="cc-number" value="4242 4242 4242 4242"><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="2.5" y="5" width="19" height="14" rx="2"/><path d="M2.5 10h19M6 15h4"/></svg></div>
<div class="cell bad"><label for="ukc-input-card-details-e">Expires</label><input id="ukc-input-card-details-e" type="text" inputmode="numeric" autocomplete="cc-exp" value="09 / 24" aria-invalid="true" aria-describedby="ukc-input-card-details-err"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 3l9.5 17h-19z"/><path d="M12 10v4M12 17h.01"/></svg></div>
<div class="cell"><label for="ukc-input-card-details-c">Security code</label><input id="ukc-input-card-details-c" type="text" inputmode="numeric" autocomplete="cc-csc" placeholder="3 digits"></div>
</div>
<p class="err" id="ukc-input-card-details-err"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 3l9.5 17h-19z"/><path d="M12 10v4M12 17h.01"/></svg><span>That date has passed. Enter the expiry printed on the card, like 09 / 28.</span></p>
<p class="safe"><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"><rect x="5" y="11" width="14" height="10" rx="1"/><path d="M8 11V8a4 4 0 0 1 8 0v3"/></svg><span>Paid to Marlowe Road Vets. The security code is never stored.</span></p>
</fieldset>
</div>
.ukc-input-card-details { 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-input-card-details *, .ukc-input-card-details *::before, .ukc-input-card-details *::after { box-sizing: border-box; }
.ukc-input-card-details :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.ukc-input-card-details :where(ul, ol) { padding: 0; list-style: none; }
.ukc-input-card-details :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ukc-input-card-details :where(a) { color: inherit; }
.ukc-input-card-details svg { flex: none; }
.ukc-input-card-details .pay { display: grid; gap: 8px; max-width: 400px; min-width: 0; margin: 0; padding: 0; border: 0; }
.ukc-input-card-details legend { padding: 0; font-size: 17px; font-weight: 700; }
.ukc-input-card-details .hint { font-size: 13px; color: var(--uk-muted); }
.ukc-input-card-details .frame { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-strong); border-radius: min(var(--uk-radius-md), 12px); background: var(--uk-paper); overflow: hidden; }
.ukc-input-card-details .cell { position: relative; display: grid; gap: 1px; min-width: 0; padding: 8px 12px 9px; }
.ukc-input-card-details .cell.num { grid-column: 1 / -1; border-bottom: 1px solid var(--line-strong); }
.ukc-input-card-details .cell + .cell + .cell { border-left: 1px solid var(--line-strong); }
.ukc-input-card-details .cell label { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--uk-muted); }
.ukc-input-card-details .cell input { width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; font-family: var(--uk-font-mono, ui-monospace, monospace); font-size: 16px; font-variant-numeric: tabular-nums; }
.ukc-input-card-details .cell input::placeholder { color: var(--uk-muted); opacity: 0.8; }
.ukc-input-card-details .cell input:focus { outline: none; }
.ukc-input-card-details .cell:focus-within { box-shadow: inset 0 0 0 2px var(--uk-accent); background: var(--tint); }
.ukc-input-card-details .cell svg { position: absolute; right: 12px; top: 50%; translate: 0 -50%; color: var(--uk-muted); }
.ukc-input-card-details .cell.bad { background: var(--danger-tint); box-shadow: inset 0 0 0 2px var(--uk-danger); }
.ukc-input-card-details .cell.bad label { color: var(--uk-ink); font-weight: 700; }
.ukc-input-card-details .cell.bad svg { color: var(--uk-danger); }
.ukc-input-card-details .err, .ukc-input-card-details .safe { display: flex; gap: 7px; font-size: 13px; }
.ukc-input-card-details .err { color: var(--uk-danger); font-weight: 600; }
.ukc-input-card-details .safe { color: var(--uk-muted); }
.ukc-input-card-details .err svg, .ukc-input-card-details .safe svg { margin-top: 2px; }
More inputs
All 27Press comma or Enter after each address. Up to 5.
- dispatch@norrlandtimber.se
- ana.ferreira@quaysideimports.pt
- gate3@kestrel
On this shipmentCapitals, numbers and spaces. 16 characters fit on one strip.
14 of 16