Components / Selects and toggles
Filter panel with picks
A filter column: a header band, the chosen filters as removable tags with a clear link, then the option groups under an apply button.
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-moj-filter">
<div class="flt">
<div class="head"><h2>Filter</h2></div>
<div class="sel">
<div class="selhead"><h3>Selected filters</h3><a href="#">Clear filters</a></div>
<h4>Status</h4>
<ul class="tags">
<li><a class="tag" href="#"><span class="sr">Remove this filter:</span> Overdue <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"/></svg></a></li>
<li><a class="tag" href="#"><span class="sr">Remove this filter:</span> Sent <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"/></svg></a></li>
</ul>
<h4>Crew</h4>
<ul class="tags"><li><a class="tag" href="#"><span class="sr">Remove this filter:</span> North team <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"/></svg></a></li></ul>
</div>
<div class="opts">
<button class="btn" type="button">Apply filters</button>
<fieldset>
<legend>Status</legend>
<label class="cb"><input type="checkbox" checked><span class="box"><svg width="18" height="18" 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></span>Overdue</label>
<label class="cb"><input type="checkbox" checked><span class="box"><svg width="18" height="18" 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></span>Sent</label>
<label class="cb"><input type="checkbox"><span class="box"><svg width="18" height="18" 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></span>Draft</label>
<label class="cb"><input type="checkbox"><span class="box"><svg width="18" height="18" 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></span>Paid</label>
</fieldset>
</div>
</div>
</div>
.ukc-toggle-moj-filter { 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-moj-filter *, .ukc-toggle-moj-filter *::before, .ukc-toggle-moj-filter *::after { box-sizing: border-box; }
.ukc-toggle-moj-filter :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.ukc-toggle-moj-filter :where(ul, ol) { padding: 0; list-style: none; }
.ukc-toggle-moj-filter :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ukc-toggle-moj-filter :where(a) { color: inherit; }
.ukc-toggle-moj-filter svg { flex: none; }
.ukc-toggle-moj-filter .flt { max-width: 300px; background: var(--uk-paper); box-shadow: inset 0 0 0 1px var(--uk-line); }
.ukc-toggle-moj-filter .head { padding: 10px 16px; background: color-mix(in srgb, var(--uk-ink) 16%, var(--uk-paper)); }
.ukc-toggle-moj-filter h2 { font-size: 22px; font-weight: 700; }
.ukc-toggle-moj-filter .sel { padding: 16px; background: color-mix(in srgb, var(--uk-ink) 5%, var(--uk-paper)); box-shadow: inset 0 0 0 1px var(--uk-line); }
.ukc-toggle-moj-filter .selhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.ukc-toggle-moj-filter h3 { font-size: 17px; font-weight: 700; }
.ukc-toggle-moj-filter .selhead a { font-size: 14px; color: var(--uk-accent); text-underline-offset: 3px; }
.ukc-toggle-moj-filter h4 { font-size: 14px; font-weight: 700; }
.ukc-toggle-moj-filter .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.ukc-toggle-moj-filter .tags:last-child { margin-bottom: 0; }
.ukc-toggle-moj-filter .tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 7px; border: 1px solid var(--uk-ink); border-radius: var(--uk-radius-sm); background: var(--uk-paper); color: var(--uk-ink); font-size: 14px; text-decoration: none; }
.ukc-toggle-moj-filter .tag:hover { background: var(--uk-ink); color: var(--uk-paper); }
.ukc-toggle-moj-filter .tag:focus-visible { outline: 3px solid var(--uk-highlight); outline-offset: 0; }
.ukc-toggle-moj-filter .opts { margin-top: -1px; padding: 16px; box-shadow: inset 0 0 0 1px var(--uk-line); }
.ukc-toggle-moj-filter .btn { padding: 8px 14px 6px; border: 0; border-radius: var(--uk-radius-sm); background: var(--uk-accent); color: var(--uk-accent-ink); font-weight: 600; box-shadow: 0 2px 0 var(--accent-deep); cursor: pointer; }
.ukc-toggle-moj-filter .btn:active { transform: translateY(2px); box-shadow: none; }
.ukc-toggle-moj-filter fieldset { margin: 18px 0 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 4px; }
.ukc-toggle-moj-filter legend { padding: 0; margin-bottom: 8px; font-size: 17px; font-weight: 700; }
.ukc-toggle-moj-filter .cb { position: relative; display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 15px; cursor: pointer; }
.ukc-toggle-moj-filter .cb input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ukc-toggle-moj-filter .box { width: 24px; height: 24px; display: grid; place-items: center; border: 2px solid var(--uk-ink); border-radius: min(var(--uk-radius-sm), 4px); background: var(--uk-paper); color: transparent; }
.ukc-toggle-moj-filter .cb input:checked + .box { color: var(--uk-ink); }
.ukc-toggle-moj-filter .box svg { stroke-width: 3; }
.ukc-toggle-moj-filter .cb input:focus-visible + .box { box-shadow: 0 0 0 3px var(--uk-highlight); }
.ukc-toggle-moj-filter .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
More selects and toggles
All 28- ThemeAlertsMenuJob 2318
Assign to
Mara EllisOmar HaddadTomasz Malek3 of 12 people
Skerry Line · crossing of 14 June