Components / Selects and toggles
Radio cards
Choices as cards with a price or detail, the chosen one outlined in the accent with a filled dot.
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-toggle-radio-cards">
<div class="rc" role="radiogroup" aria-label="Delivery">
<label class="c on"><input type="radio" name="ukc-rc" checked><span class="top"><span class="t">Standard</span><span class="dot"></span></span><span class="d">4 to 6 working days</span><span class="p">Free</span></label>
<label class="c"><input type="radio" name="ukc-rc"><span class="top"><span class="t">Express</span><span class="dot"></span></span><span class="d">Next working day</span><span class="p">$14</span></label>
</div>
</div>
.ukc-toggle-radio-cards { 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-toggle-radio-cards *, .ukc-toggle-radio-cards *::before, .ukc-toggle-radio-cards *::after { box-sizing: border-box; }
.ukc-toggle-radio-cards :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.ukc-toggle-radio-cards :where(ul, ol) { padding: 0; list-style: none; }
.ukc-toggle-radio-cards :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ukc-toggle-radio-cards :where(a) { color: inherit; }
.ukc-toggle-radio-cards svg { flex: none; }
.ukc-toggle-radio-cards .rc { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; max-width: 440px; }
.ukc-toggle-radio-cards .c { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--uk-line); border-radius: var(--uk-radius-lg); background: var(--uk-paper); cursor: pointer; }
.ukc-toggle-radio-cards .c.on { border-color: var(--uk-accent); box-shadow: 0 0 0 1px var(--uk-accent); background: var(--tint); }
.ukc-toggle-radio-cards input { position: absolute; opacity: 0; }
.ukc-toggle-radio-cards .top { display: flex; justify-content: space-between; align-items: center; }
.ukc-toggle-radio-cards .t { font-weight: 700; }
.ukc-toggle-radio-cards .dot { width: 16px; height: 16px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--uk-paper); }
.ukc-toggle-radio-cards .c.on .dot { border: 5px solid var(--uk-accent); }
.ukc-toggle-radio-cards .d { font-size: 14px; color: var(--uk-muted); }
.ukc-toggle-radio-cards .p { font-family: var(--uk-font-mono, ui-monospace, monospace); font-size: 14px; }
More selects and toggles
All 28- 0%25%50%
Trades on this job 3 selected
Label color
Accent