Selectable Topic Chips
Topic chips respond to hover and support multi-selection for category filtering.
Topic chips respond to hover and support multi-selection for category filtering.
Live Demo
Hover over the element or use Tab to focus.
Source Code
Copy the HTML, CSS or JavaScript you need for your project.
<fieldset class="tbx-1038"><legend>Choose category</legend><label><input type="checkbox" checked><span>Web</span></label><label><input type="checkbox"><span>Brand</span></label><label><input type="checkbox"><span>UI</span></label><label><input type="checkbox"><span>Motion</span></label></fieldset>
.tbx-1038{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:7px;border:0;padding:0;margin:0;font:600 12px/1.3 system-ui}
.tbx-1038 legend{width:100%;text-align:center;color:#6a7888;font-size:10px;font-weight:600;margin-bottom:11px}
.tbx-1038 label{cursor:pointer;position:relative}.tbx-1038 input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}
.tbx-1038 span{display:inline-flex;min-width:49px;justify-content:center;padding:10px 13px;border:1px solid #c9d6e2;border-radius:100px;background:#fff;color:#445d77;transition:background .22s,color .22s,transform .22s,border-color .22s}
.tbx-1038 label:is(:hover,:focus-within) span{border-color:#396e82;background:#e6f3f0;transform:translateY(-2px)}
.tbx-1038 input:checked+span{background:#17485a;color:#fff;border-color:#17485a}
.tbx-1038 input:focus-visible+span{outline:3px solid #db9b5e;outline-offset:2px}
@media(prefers-reduced-motion:reduce){.tbx-1038 span{transition:none}}
How to Use
Insert the HTML and add the CSS to your stylesheet. Adjust colors and sizes and avoid class conflicts.
Use Case
Useful for filter sections and portfolio galleries.
Technical Notes
Keep controls usable on touch devices. Test keyboard focus and reduced-motion preferences.
Mobile: Ensure the interactive content remains accessible without hover on touch devices.
Browser: Uses modern CSS. Check behavior in the browsers you support.
Reduced Motion: Check that prefers-reduced-motion is respected.