Components / Selects and toggles
Large radios
Big round radios with labels you can hit easily and a hint under each choice.
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-govuk-radios">
<fieldset>
<legend>How should we contact you?</legend>
<label class="r"><input type="radio" name="ukc-gr" checked><span class="mark"></span><span><span class="t">Email</span><span class="h">We reply within one working day</span></span></label>
<label class="r"><input type="radio" name="ukc-gr"><span class="mark"></span><span><span class="t">Phone</span><span class="h">Weekdays, 9 AM to 5 PM PT (noon to 8 PM ET)</span></span></label>
<label class="r"><input type="radio" name="ukc-gr"><span class="mark"></span><span><span class="t">Text message</span></span></label>
</fieldset>
</div>
.ukc-toggle-govuk-radios { 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-govuk-radios *, .ukc-toggle-govuk-radios *::before, .ukc-toggle-govuk-radios *::after { box-sizing: border-box; }
.ukc-toggle-govuk-radios :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.ukc-toggle-govuk-radios :where(ul, ol) { padding: 0; list-style: none; }
.ukc-toggle-govuk-radios :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ukc-toggle-govuk-radios :where(a) { color: inherit; }
.ukc-toggle-govuk-radios svg { flex: none; }
.ukc-toggle-govuk-radios fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.ukc-toggle-govuk-radios legend { font-weight: 700; font-size: 19px; margin-bottom: 8px; }
.ukc-toggle-govuk-radios .r { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: start; cursor: pointer; }
.ukc-toggle-govuk-radios input { position: absolute; opacity: 0; }
.ukc-toggle-govuk-radios .mark { width: 40px; height: 40px; border: 2px solid var(--uk-ink); border-radius: 999px; display: grid; place-items: center; background: var(--uk-paper); }
.ukc-toggle-govuk-radios input:checked + .mark::after { content: ""; width: 20px; height: 20px; border-radius: 999px; background: var(--uk-ink); }
.ukc-toggle-govuk-radios input:focus-visible + .mark { box-shadow: 0 0 0 4px var(--uk-highlight); }
.ukc-toggle-govuk-radios .t { display: block; font-size: 19px; padding-top: 6px; }
.ukc-toggle-govuk-radios .h { display: block; color: var(--uk-muted); }
More selects and toggles
All 28- Email notificationsWeekly digest
Auto-send invoices
OnRound hours up
Off