Filter chips
Chips you switch on and off. On shows a check and a fill, and there is a clear-all at the end.
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-badge-filter-chips">
<div class="row">
<button class="chip on" type="button" aria-pressed="true"><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> Open</button>
<button class="chip on" type="button" aria-pressed="true"><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> Assigned to me</button>
<button class="chip" type="button" aria-pressed="false">Overdue</button>
<button class="chip" type="button" aria-pressed="false">This week</button>
<button class="clear" type="button">Clear all</button>
</div>
</div>
.ukc-badge-filter-chips { 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-badge-filter-chips *, .ukc-badge-filter-chips *::before, .ukc-badge-filter-chips *::after { box-sizing: border-box; }
.ukc-badge-filter-chips :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.ukc-badge-filter-chips :where(ul, ol) { padding: 0; list-style: none; }
.ukc-badge-filter-chips :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ukc-badge-filter-chips :where(a) { color: inherit; }
.ukc-badge-filter-chips svg { flex: none; }
.ukc-badge-filter-chips .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ukc-badge-filter-chips .chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--uk-line); border-radius: var(--uk-radius-md); background: var(--uk-paper); font-size: 14px; cursor: pointer; }
.ukc-badge-filter-chips .chip.on { background: var(--tint); border-color: var(--uk-accent); color: var(--accent-deep); }
.ukc-badge-filter-chips .clear { border: 0; background: none; color: var(--uk-muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
More badges and chips
All 25- MRMara Reyes DWDana Whitfield
- Approved Priority Void
- New
Winter catalog
48 items
- Upload62% Storage88%
Press ⌘K to search, Shift? for help, Esc to close.
- New
Winter catalog
48 items
FeaturedCrew plan
$24 a month
PaidInvoice 1042
$2,140