About this set
Two filter patterns for listing pages. Filter navigation is a single row of pill links, each with a count badge (All 248, Templates 96, Components 74 and so on); the current category is a solid dark pill marked with aria-current=”page”. The row scrolls sideways when it runs out of room, with the scrollbar hidden and a gradient fading the right edge to hint that there is more. Active filters is a wrapping list of indigo chips, each with a small round button that removes it. Use the pills for top-level categories on a gallery, shop or blog archive, and the chips to show which filters are applied to a search. The pills need no JavaScript: they are plain links, so each category can have its own URL. The chips use a few lines of script that remove the chip and move keyboard focus to the next chip’s button, or the previous one, or the list itself when the last chip is gone, so keyboard users keep their place. The scroller has inner padding so focus rings are not clipped at its edges.
What’s included
- Scrollable pill row with a hidden scrollbar and a fading edge
- Count badges inside each pill
- Current category marked with aria-current="page"
- Removable chips that hand focus to the next chip
- Bootstrap version uses .nav-pills, .badge and .btn-close
Accessibility
The pills are links in a list inside a nav labelled Categories, with aria-current="page" on the current one. Each remove button is a real button named "Remove filter: …", and after a removal focus moves to a neighbouring chip instead of being lost. Pills and buttons show an indigo :focus-visible outline, and the colour transitions switch off under prefers-reduced-motion.
Customise it
In plain CSS set --fp-ink (the current pill), --fp-bg (match the page so the fade blends) and --chip-ink on .chips. In Bootstrap the pill colours are the --bs-nav-pills-* and --bs-nav-link-* variables on .fp; in Tailwind edit the #101828, #f4f5f9 and #3730a3 values in the utilities.



















