Open demo

CSS code

HTML
<div><span class="lbl">Search, chips and sort</span>
<form class="fb" role="search" aria-label="Jobs">
  <div class="fb-top">
    <div class="fb-search">
      <label class="sr-only" for="fb-jobs">Search roles</label>
      <svg class="fb-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>
      <input class="fb-input" id="fb-jobs" type="search" name="q" placeholder="Search 128 open roles">
    </div>
    <label class="fb-sort">Sort by
      <select class="fb-select" name="sort"><option>Most relevant</option><option>Newest first</option><option>Highest salary</option></select>
    </label>
  </div>
  <div class="fb-row">
    <fieldset class="fb-chips">
      <legend class="sr-only">Filter roles</legend>
      <label class="fb-chip"><input type="checkbox" name="type" value="remote" checked><span><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="m5 12 5 5 9-10"/></svg>Remote</span></label>
      <label class="fb-chip"><input type="checkbox" name="type" value="full-time" checked><span><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="m5 12 5 5 9-10"/></svg>Full-time</span></label>
      <label class="fb-chip"><input type="checkbox" name="type" value="contract"><span><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="m5 12 5 5 9-10"/></svg>Contract</span></label>
      <label class="fb-chip"><input type="checkbox" name="level" value="senior"><span><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="m5 12 5 5 9-10"/></svg>Senior</span></label>
      <label class="fb-chip"><input type="checkbox" name="team" value="design"><span><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="m5 12 5 5 9-10"/></svg>Design</span></label>
    </fieldset>
    <button class="fb-btn" type="submit">Show 128 roles</button>
  </div>
</form></div>

<div><span class="lbl">Removable active filters</span>
<form class="fb" role="search" aria-label="Recipes">
  <div class="fb-top">
    <div class="fb-search">
      <label class="sr-only" for="fb-recipes">Search recipes</label>
      <svg class="fb-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>
      <input class="fb-input" id="fb-recipes" type="search" name="q" value="pasta" placeholder="Search recipes">
    </div>
    <button class="fb-btn" type="submit">Search</button>
  </div>
  <input type="hidden" name="diet" value="vegetarian"><input type="hidden" name="time" value="30"><input type="hidden" name="free" value="nuts">
  <div class="fb-active">
    <span class="fb-active-lbl" id="fb-active-lbl"><b>42 recipes</b> filtered by</span>
    <ul aria-labelledby="fb-active-lbl">
      <li><a class="fb-tag" href="?q=pasta&time=30&free=nuts" aria-label="Vegetarian, remove filter">Vegetarian<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" aria-hidden="true" focusable="false"><path d="M6 6l12 12M18 6 6 18"/></svg></a></li>
      <li><a class="fb-tag" href="?q=pasta&diet=vegetarian&free=nuts" aria-label="Under 30 minutes, remove filter">Under 30 min<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" aria-hidden="true" focusable="false"><path d="M6 6l12 12M18 6 6 18"/></svg></a></li>
      <li><a class="fb-tag" href="?q=pasta&diet=vegetarian&time=30" aria-label="Nut-free, remove filter">Nut-free<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" aria-hidden="true" focusable="false"><path d="M6 6l12 12M18 6 6 18"/></svg></a></li>
    </ul>
    <a class="fb-clear" href="?q=pasta">Clear all</a>
  </div>
</form></div>
CSS
/* Filter bars: a search field with the controls that shape the results — checkbox chips, a sort <select>
   and removable active filters. Everything is a real form control or link, so it works as a plain GET form. */
.fb{--fb-ink:#0f172a;--fb-text:#334155;--fb-muted:#64748b;--fb-line:#7c889c;--fb-accent:#0369a1;--fb-accent-dark:#075985;
  --fb-soft:#e0f2fe;--fb-ring:rgba(3,105,161,.22);padding:16px;color:var(--fb-ink);background:#fff;border:1px solid #d9dfe7;border-radius:16px;
  box-shadow:0 1px 2px rgba(15,23,42,.04),0 12px 30px -14px rgba(15,23,42,.14)}
.fb *{box-sizing:border-box}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.fb-top{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.fb-search{position:relative;flex:1 1 180px;min-width:0}
.fb-ico{position:absolute;left:13px;top:50%;width:18px;height:18px;margin-top:-9px;color:var(--fb-muted);pointer-events:none}
.fb-input{width:100%;height:44px;margin:0;padding:0 14px 0 40px;font:inherit;font-size:.95rem;color:inherit;background:#fff;border:1px solid var(--fb-line);
  border-radius:10px;-webkit-appearance:none;appearance:none;transition:border-color .15s,box-shadow .15s}
.fb-input::placeholder{color:var(--fb-muted);opacity:1}
.fb-input:focus,.fb-select:focus-visible{outline:none;border-color:var(--fb-accent);box-shadow:0 0 0 1px var(--fb-accent),0 0 0 4px var(--fb-ring)}
.fb-sort{display:flex;align-items:center;gap:8px;font-size:.86rem;font-weight:500;color:var(--fb-text);white-space:nowrap}
.fb-select{height:44px;margin:0;padding:0 34px 0 12px;font:inherit;font-size:.9rem;font-weight:600;color:var(--fb-ink);cursor:pointer;border:1px solid var(--fb-line);border-radius:10px;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 11px center/14px;
  -webkit-appearance:none;appearance:none}
.fb-btn{display:inline-flex;align-items:center;justify-content:center;height:44px;margin:0;padding:0 18px;border:0;border-radius:10px;background:var(--fb-accent);color:#fff;
  font:inherit;font-size:.9rem;font-weight:600;white-space:nowrap;cursor:pointer;transition:background-color .15s}
.fb-btn:hover{background:var(--fb-accent-dark)}
.fb-btn:focus-visible,.fb a:focus-visible{outline:2px solid var(--fb-accent);outline-offset:2px}
/* A: checkbox chips */
.fb-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:14px;padding-top:14px;border-top:1px solid #e5e9ef}
.fb-chips{display:flex;flex-wrap:wrap;gap:8px;flex:1 1 auto;min-width:0;margin:0;padding:0;border:0}
.fb-chip{position:relative}
.fb-chip input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.fb-chip span{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 14px;border:1px solid var(--fb-line);border-radius:999px;background:#fff;
  color:var(--fb-text);font-size:.86rem;font-weight:500;transition:background-color .15s,border-color .15s,color .15s}
.fb-chip svg{display:none;width:14px;height:14px}
.fb-chip:hover span{border-color:var(--fb-ink)}
.fb-chip input:checked+span{padding-left:10px;background:var(--fb-soft);border-color:var(--fb-accent);color:var(--fb-accent-dark)}
.fb-chip input:checked+span svg{display:block}
.fb-chip input:focus-visible+span{outline:2px solid var(--fb-accent);outline-offset:2px}
.fb-row .fb-btn{height:36px;margin-left:auto;background:var(--fb-ink)}
.fb-row .fb-btn:hover{background:#334155}
/* B: active filters you can remove */
.fb-active{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:14px;padding-top:14px;border-top:1px solid #e5e9ef;font-size:.86rem}
.fb-active-lbl{color:var(--fb-muted)}
.fb-active-lbl b{color:var(--fb-ink)}
.fb-active ul{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none}
.fb-tag{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 8px 0 12px;border-radius:8px;background:var(--fb-soft);color:var(--fb-accent-dark);
  font-weight:600;text-decoration:none;transition:background-color .15s}
.fb-tag:hover{background:#bae6fd}
.fb-tag svg{width:14px;height:14px}
.fb-clear{margin-left:auto;color:var(--fb-accent);font-weight:600;text-decoration:underline;text-underline-offset:3px;border-radius:4px}
.fb-clear:hover{color:var(--fb-accent-dark)}
@media (prefers-reduced-motion:reduce){.fb-input,.fb-btn,.fb-chip span,.fb-tag{transition:none}}

Bootstrap 5 code

Requires: Bootstrap 5.3.8 CSS

HTML
<div><span class="lbl">Search, chips and sort</span>
<form class="fb" role="search" aria-label="Jobs">
  <div class="fb-top d-flex flex-wrap align-items-center">
    <div class="fb-search position-relative">
      <label class="visually-hidden" for="fb-jobs">Search roles</label>
      <svg class="fb-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>
      <input class="form-control" id="fb-jobs" type="search" name="q" placeholder="Search 128 open roles">
    </div>
    <label class="fb-sort d-flex align-items-center gap-2">Sort by
      <select class="form-select" name="sort"><option>Most relevant</option><option>Newest first</option><option>Highest salary</option></select>
    </label>
  </div>
  <div class="fb-row d-flex flex-wrap align-items-center">
    <fieldset class="fb-chips d-flex flex-wrap gap-2">
      <legend class="visually-hidden">Filter roles</legend>
      <input type="checkbox" class="btn-check" name="type" value="remote" id="fb-remote" checked><label class="btn fb-chip" for="fb-remote"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="m5 12 5 5 9-10"/></svg>Remote</label>
      <input type="checkbox" class="btn-check" name="type" value="full-time" id="fb-full" checked><label class="btn fb-chip" for="fb-full"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="m5 12 5 5 9-10"/></svg>Full-time</label>
      <input type="checkbox" class="btn-check" name="type" value="contract" id="fb-contract"><label class="btn fb-chip" for="fb-contract"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="m5 12 5 5 9-10"/></svg>Contract</label>
      <input type="checkbox" class="btn-check" name="level" value="senior" id="fb-senior"><label class="btn fb-chip" for="fb-senior"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="m5 12 5 5 9-10"/></svg>Senior</label>
      <input type="checkbox" class="btn-check" name="team" value="design" id="fb-design"><label class="btn fb-chip" for="fb-design"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="m5 12 5 5 9-10"/></svg>Design</label>
    </fieldset>
    <button class="btn fb-btn ms-auto" type="submit">Show 128 roles</button>
  </div>
</form></div>

<div><span class="lbl">Removable active filters</span>
<form class="fb" role="search" aria-label="Recipes">
  <div class="fb-top d-flex flex-wrap align-items-center">
    <div class="fb-search position-relative">
      <label class="visually-hidden" for="fb-recipes">Search recipes</label>
      <svg class="fb-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>
      <input class="form-control" id="fb-recipes" type="search" name="q" value="pasta" placeholder="Search recipes">
    </div>
    <button class="btn fb-btn" type="submit">Search</button>
  </div>
  <input type="hidden" name="diet" value="vegetarian"><input type="hidden" name="time" value="30"><input type="hidden" name="free" value="nuts">
  <div class="fb-active d-flex flex-wrap align-items-center gap-2">
    <span class="fb-active-lbl" id="fb-active-lbl"><b>42 recipes</b> filtered by</span>
    <ul class="fb-tags list-unstyled d-flex flex-wrap m-0" aria-labelledby="fb-active-lbl">
      <li><a class="btn fb-tag" href="?q=pasta&time=30&free=nuts" aria-label="Vegetarian, remove filter">Vegetarian<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" aria-hidden="true" focusable="false"><path d="M6 6l12 12M18 6 6 18"/></svg></a></li>
      <li><a class="btn fb-tag" href="?q=pasta&diet=vegetarian&free=nuts" aria-label="Under 30 minutes, remove filter">Under 30 min<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" aria-hidden="true" focusable="false"><path d="M6 6l12 12M18 6 6 18"/></svg></a></li>
      <li><a class="btn fb-tag" href="?q=pasta&diet=vegetarian&time=30" aria-label="Nut-free, remove filter">Nut-free<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" aria-hidden="true" focusable="false"><path d="M6 6l12 12M18 6 6 18"/></svg></a></li>
    </ul>
    <a class="fb-clear ms-auto" href="?q=pasta">Clear all</a>
  </div>
</form></div>
CSS
/* Bootstrap filter bars: .form-control, .form-select, .btn-check chips and .btn links, recoloured through --fb-* and --bs-btn-* variables. */
.fb{--fb-ink:#0f172a;--fb-text:#334155;--fb-muted:#64748b;--fb-line:#7c889c;--fb-accent:#0369a1;--fb-accent-dark:#075985;
  --fb-soft:#e0f2fe;--fb-ring:rgba(3,105,161,.22);padding:16px;color:var(--fb-ink);background:#fff;border:1px solid #d9dfe7;border-radius:16px;
  box-shadow:0 1px 2px rgba(15,23,42,.04),0 12px 30px -14px rgba(15,23,42,.14)}
.fb-top{gap:10px}
.fb-search{flex:1 1 180px;min-width:0}
.fb-ico{position:absolute;left:13px;top:50%;z-index:1;width:18px;height:18px;margin-top:-9px;color:var(--fb-muted);pointer-events:none}
.fb .form-control{height:44px;padding:0 14px 0 40px;font-size:.95rem;color:var(--fb-ink);border-color:var(--fb-line);border-radius:10px;-webkit-appearance:none;appearance:none}
.fb .form-control::placeholder{color:var(--fb-muted);opacity:1}
.fb .form-control:focus,.fb .form-select:focus-visible{border-color:var(--fb-accent);box-shadow:0 0 0 1px var(--fb-accent),0 0 0 4px var(--fb-ring)}
.fb .form-select:focus:not(:focus-visible){border-color:var(--fb-line);box-shadow:none}
.fb-sort{font-size:.86rem;font-weight:500;color:var(--fb-text);white-space:nowrap}
.fb .form-select{width:auto;height:44px;padding:0 34px 0 12px;font-size:.9rem;font-weight:600;color:var(--fb-ink);border-color:var(--fb-line);border-radius:10px;cursor:pointer;
  --bs-form-select-bg-img:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-position:right 11px center;background-size:14px}
.fb .fb-btn{--bs-btn-padding-x:18px;--bs-btn-font-size:.9rem;--bs-btn-font-weight:600;--bs-btn-border-radius:10px;--bs-btn-border-width:0;
  --bs-btn-bg:var(--fb-accent);--bs-btn-color:#fff;--bs-btn-hover-bg:var(--fb-accent-dark);--bs-btn-hover-color:#fff;--bs-btn-active-bg:var(--fb-accent-dark);--bs-btn-active-color:#fff;
  display:inline-flex;align-items:center;justify-content:center;height:44px;white-space:nowrap}
.fb .btn:focus-visible,.fb .btn-check:focus-visible+.btn,.fb a:focus-visible{outline:2px solid var(--fb-accent);outline-offset:2px;box-shadow:none}
/* A: checkbox chips */
.fb-row{gap:12px;margin-top:14px;padding-top:14px;border-top:1px solid #e5e9ef}
.fb-chips{flex:1 1 auto;min-width:0}
.fb .fb-chip{--bs-btn-padding-x:14px;--bs-btn-padding-y:0;--bs-btn-font-size:.86rem;--bs-btn-font-weight:500;--bs-btn-border-radius:999px;
  --bs-btn-bg:#fff;--bs-btn-color:var(--fb-text);--bs-btn-border-color:var(--fb-line);--bs-btn-hover-bg:#fff;--bs-btn-hover-color:var(--fb-text);--bs-btn-hover-border-color:var(--fb-ink);
  --bs-btn-active-bg:var(--fb-soft);--bs-btn-active-color:var(--fb-accent-dark);--bs-btn-active-border-color:var(--fb-accent);
  display:inline-flex;align-items:center;gap:6px;height:34px}
.fb-chip svg{display:none;width:14px;height:14px}
.fb .btn-check:checked+.fb-chip{padding-left:10px}
.btn-check:checked+.fb-chip svg{display:block}
.fb-row .fb-btn{--bs-btn-bg:var(--fb-ink);--bs-btn-hover-bg:#334155;--bs-btn-active-bg:#334155;height:36px}
/* B: active filters you can remove */
.fb-active{margin-top:14px;padding-top:14px;border-top:1px solid #e5e9ef;font-size:.86rem}
.fb-active-lbl{color:var(--fb-muted)}
.fb-tags{gap:6px}
.fb-active-lbl b{color:var(--fb-ink)}
.fb .fb-tag{--bs-btn-padding-x:0;--bs-btn-padding-y:0;--bs-btn-font-size:.86rem;--bs-btn-font-weight:600;--bs-btn-border-radius:8px;--bs-btn-border-width:0;
  --bs-btn-bg:var(--fb-soft);--bs-btn-color:var(--fb-accent-dark);--bs-btn-hover-bg:#bae6fd;--bs-btn-hover-color:var(--fb-accent-dark);--bs-btn-active-bg:#bae6fd;
  display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 8px 0 12px}
.fb-tag svg{width:14px;height:14px}
.fb .fb-clear{color:var(--fb-accent);font-weight:600;text-underline-offset:3px;border-radius:4px}
.fb .fb-clear:hover{color:var(--fb-accent-dark)}

Tailwind 4 code

Requires: Tailwind CSS 4

HTML
<div><span class="mb-3.5 block text-[.72rem] tracking-[.12em] text-[#56606f] uppercase">Search, chips and sort</span>
<form class="rounded-2xl border border-[#d9dfe7] bg-white p-4 text-fb-ink shadow-[0_1px_2px_rgba(15,23,42,.04),0_12px_30px_-14px_rgba(15,23,42,.14)]" role="search" aria-label="Jobs">
  <div class="flex flex-wrap items-center gap-2.5">
    <div class="relative min-w-0 flex-[1_1_180px]">
      <label class="sr-only" for="fb-jobs">Search roles</label>
      <svg class="pointer-events-none absolute top-1/2 left-[13px] size-[18px] -translate-y-1/2 text-fb-muted" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>
      <input class="h-11 w-full appearance-none rounded-[10px] border border-fb-line bg-white pr-3.5 pl-10 text-[.95rem] text-fb-ink transition-[border-color,box-shadow] duration-150 placeholder:text-fb-muted focus:border-fb-accent focus:shadow-[0_0_0_1px_var(--color-fb-accent),0_0_0_4px_rgba(3,105,161,.22)] focus:outline-none motion-reduce:transition-none" id="fb-jobs" type="search" name="q" placeholder="Search 128 open roles">
    </div>
    <label class="flex items-center gap-2 text-[.86rem] font-medium whitespace-nowrap text-fb-text">Sort by
      <select class="bg-chevron h-11 cursor-pointer appearance-none rounded-[10px] border border-fb-line bg-white pr-[34px] pl-3 text-[.9rem] font-semibold text-fb-ink focus-visible:border-fb-accent focus-visible:shadow-[0_0_0_1px_var(--color-fb-accent),0_0_0_4px_rgba(3,105,161,.22)] focus-visible:outline-none" name="sort"><option>Most relevant</option><option>Newest first</option><option>Highest salary</option></select>
    </label>
  </div>
  <div class="mt-3.5 flex flex-wrap items-center gap-3 border-t border-[#e5e9ef] pt-3.5">
    <fieldset class="flex min-w-0 flex-auto flex-wrap gap-2">
      <legend class="sr-only">Filter roles</legend>
      <label class="group relative"><input class="peer absolute inset-0 m-0 size-full cursor-pointer opacity-0" type="checkbox" name="type" value="remote" checked><span class="inline-flex h-[34px] items-center gap-1.5 rounded-full border border-fb-line bg-white px-3.5 text-[.86rem] font-medium text-fb-text transition-colors duration-150 group-hover:border-fb-ink peer-checked:border-fb-accent peer-checked:bg-fb-soft peer-checked:pl-2.5 peer-checked:text-fb-accent-dark peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-fb-accent motion-reduce:transition-none"><svg class="hidden size-3.5 group-has-checked:block" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="m5 12 5 5 9-10"/></svg>Remote</span></label>
      <label class="group relative"><input class="peer absolute inset-0 m-0 size-full cursor-pointer opacity-0" type="checkbox" name="type" value="full-time" checked><span class="inline-flex h-[34px] items-center gap-1.5 rounded-full border border-fb-line bg-white px-3.5 text-[.86rem] font-medium text-fb-text transition-colors duration-150 group-hover:border-fb-ink peer-checked:border-fb-accent peer-checked:bg-fb-soft peer-checked:pl-2.5 peer-checked:text-fb-accent-dark peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-fb-accent motion-reduce:transition-none"><svg class="hidden size-3.5 group-has-checked:block" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="m5 12 5 5 9-10"/></svg>Full-time</span></label>
      <label class="group relative"><input class="peer absolute inset-0 m-0 size-full cursor-pointer opacity-0" type="checkbox" name="type" value="contract"><span class="inline-flex h-[34px] items-center gap-1.5 rounded-full border border-fb-line bg-white px-3.5 text-[.86rem] font-medium text-fb-text transition-colors duration-150 group-hover:border-fb-ink peer-checked:border-fb-accent peer-checked:bg-fb-soft peer-checked:pl-2.5 peer-checked:text-fb-accent-dark peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-fb-accent motion-reduce:transition-none"><svg class="hidden size-3.5 group-has-checked:block" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="m5 12 5 5 9-10"/></svg>Contract</span></label>
      <label class="group relative"><input class="peer absolute inset-0 m-0 size-full cursor-pointer opacity-0" type="checkbox" name="level" value="senior"><span class="inline-flex h-[34px] items-center gap-1.5 rounded-full border border-fb-line bg-white px-3.5 text-[.86rem] font-medium text-fb-text transition-colors duration-150 group-hover:border-fb-ink peer-checked:border-fb-accent peer-checked:bg-fb-soft peer-checked:pl-2.5 peer-checked:text-fb-accent-dark peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-fb-accent motion-reduce:transition-none"><svg class="hidden size-3.5 group-has-checked:block" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="m5 12 5 5 9-10"/></svg>Senior</span></label>
      <label class="group relative"><input class="peer absolute inset-0 m-0 size-full cursor-pointer opacity-0" type="checkbox" name="team" value="design"><span class="inline-flex h-[34px] items-center gap-1.5 rounded-full border border-fb-line bg-white px-3.5 text-[.86rem] font-medium text-fb-text transition-colors duration-150 group-hover:border-fb-ink peer-checked:border-fb-accent peer-checked:bg-fb-soft peer-checked:pl-2.5 peer-checked:text-fb-accent-dark peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-fb-accent motion-reduce:transition-none"><svg class="hidden size-3.5 group-has-checked:block" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="m5 12 5 5 9-10"/></svg>Design</span></label>
    </fieldset>
    <button class="inline-flex h-9 cursor-pointer items-center justify-center rounded-[10px] bg-fb-ink px-[18px] text-[.9rem] font-semibold whitespace-nowrap text-white transition-colors duration-150 hover:bg-[#334155] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-fb-accent motion-reduce:transition-none ml-auto" type="submit">Show 128 roles</button>
  </div>
</form></div>

<div><span class="mb-3.5 block text-[.72rem] tracking-[.12em] text-[#56606f] uppercase">Removable active filters</span>
<form class="rounded-2xl border border-[#d9dfe7] bg-white p-4 text-fb-ink shadow-[0_1px_2px_rgba(15,23,42,.04),0_12px_30px_-14px_rgba(15,23,42,.14)]" role="search" aria-label="Recipes">
  <div class="flex flex-wrap items-center gap-2.5">
    <div class="relative min-w-0 flex-[1_1_180px]">
      <label class="sr-only" for="fb-recipes">Search recipes</label>
      <svg class="pointer-events-none absolute top-1/2 left-[13px] size-[18px] -translate-y-1/2 text-fb-muted" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true" focusable="false"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>
      <input class="h-11 w-full appearance-none rounded-[10px] border border-fb-line bg-white pr-3.5 pl-10 text-[.95rem] text-fb-ink transition-[border-color,box-shadow] duration-150 placeholder:text-fb-muted focus:border-fb-accent focus:shadow-[0_0_0_1px_var(--color-fb-accent),0_0_0_4px_rgba(3,105,161,.22)] focus:outline-none motion-reduce:transition-none" id="fb-recipes" type="search" name="q" value="pasta" placeholder="Search recipes">
    </div>
    <button class="inline-flex h-11 cursor-pointer items-center justify-center rounded-[10px] bg-fb-accent px-[18px] text-[.9rem] font-semibold whitespace-nowrap text-white transition-colors duration-150 hover:bg-fb-accent-dark focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-fb-accent motion-reduce:transition-none" type="submit">Search</button>
  </div>
  <input type="hidden" name="diet" value="vegetarian"><input type="hidden" name="time" value="30"><input type="hidden" name="free" value="nuts">
  <div class="mt-3.5 flex flex-wrap items-center gap-2 border-t border-[#e5e9ef] pt-3.5 text-[.86rem]">
    <span class="text-fb-muted" id="fb-active-lbl"><b class="text-fb-ink">42 recipes</b> filtered by</span>
    <ul class="flex flex-wrap gap-1.5" aria-labelledby="fb-active-lbl">
      <li><a class="inline-flex h-[30px] items-center gap-1.5 rounded-lg bg-fb-soft pr-2 pl-3 font-semibold text-fb-accent-dark transition-colors duration-150 hover:bg-[#bae6fd] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-fb-accent motion-reduce:transition-none" href="?q=pasta&time=30&free=nuts" aria-label="Vegetarian, remove filter">Vegetarian<svg class="size-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" aria-hidden="true" focusable="false"><path d="M6 6l12 12M18 6 6 18"/></svg></a></li>
      <li><a class="inline-flex h-[30px] items-center gap-1.5 rounded-lg bg-fb-soft pr-2 pl-3 font-semibold text-fb-accent-dark transition-colors duration-150 hover:bg-[#bae6fd] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-fb-accent motion-reduce:transition-none" href="?q=pasta&diet=vegetarian&free=nuts" aria-label="Under 30 minutes, remove filter">Under 30 min<svg class="size-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" aria-hidden="true" focusable="false"><path d="M6 6l12 12M18 6 6 18"/></svg></a></li>
      <li><a class="inline-flex h-[30px] items-center gap-1.5 rounded-lg bg-fb-soft pr-2 pl-3 font-semibold text-fb-accent-dark transition-colors duration-150 hover:bg-[#bae6fd] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-fb-accent motion-reduce:transition-none" href="?q=pasta&diet=vegetarian&time=30" aria-label="Nut-free, remove filter">Nut-free<svg class="size-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" aria-hidden="true" focusable="false"><path d="M6 6l12 12M18 6 6 18"/></svg></a></li>
    </ul>
    <a class="ml-auto rounded font-semibold text-fb-accent underline underline-offset-3 hover:text-fb-accent-dark focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-fb-accent" href="?q=pasta">Clear all</a>
  </div>
</form></div>
CSS
@theme {
  --color-fb-ink: #0f172a;
  --color-fb-text: #334155;
  --color-fb-muted: #64748b;
  --color-fb-line: #7c889c;
  --color-fb-accent: #0369a1;
  --color-fb-accent-dark: #075985;
  --color-fb-soft: #e0f2fe;
}
@utility bg-chevron {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 14px;
}

About this set

Toolbars that sit above a list of results and combine search with the controls that shape it. Search, chips and sort is a job board toolbar with a search field, a Sort by select with a visible label, a row of checkbox chips for Remote, Full-time, Contract, Senior and Design, and a Show 128 roles button that applies them. Checked chips turn blue and show a tick, so the state never depends on colour alone. Removable active filters is a recipe search that keeps the query in the field, shows the result count and lists each active filter as a link that removes it, plus a Clear all link; the current filters travel with the form as hidden inputs. Both are ordinary GET forms, so they work with server-rendered pages without JavaScript, and a script can later apply changes instantly if you want that. Use the chip toolbar for catalogues and job boards and the active-filter row wherever filters are chosen in a sidebar or drawer.

What’s included

  • Checkbox chips with a tick on the checked state
  • Sort select with a visible label
  • Removable filter links with descriptive accessible names
  • Hidden inputs keep active filters when the query changes
  • Bootstrap version on .btn-check, .form-select and .btn

Accessibility

Both toolbars are forms with role="search". The chips are real checkboxes grouped in a fieldset with a hidden legend, and the sort select is wrapped in its visible label. Each remove link is named like Vegetarian, remove filter, so the visible text comes first. Chips, links and buttons draw a 2px outline on keyboard focus, the fields get an accent ring, and transitions are removed under prefers-reduced-motion.

Customise it

Change --fb-accent, --fb-soft and --fb-line on .fb for colour; the chip height is set on .fb-chip span. Bootstrap maps the same properties onto --bs-btn-* variables for the chips and tags; in Tailwind edit the --color-fb-* theme colours.