Chip Autocomplete Dropdown
A copy-paste tags & chips input component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Tags & Chips InputHTMLCSSany framework
react
- typescript
- typography
- typed-arrays
Copy into your project
HTML
<div class="nuda-chip-auto">
<div class="nuda-chip-auto__field">
<span class="nuda-chip-auto__chip">react</span>
<input class="nuda-chip-auto__input" value="ty" />
</div>
<ul class="nuda-chip-auto__list" role="listbox">
<li class="nuda-chip-auto__opt nuda-chip-auto__opt--active"><b>ty</b>pescript</li>
<li class="nuda-chip-auto__opt"><b>ty</b>pography</li>
<li class="nuda-chip-auto__opt"><b>ty</b>ped-arrays</li>
</ul>
</div>CSS
/* Chip Autocomplete Dropdown
Suggests matching chips as you type.
Customize: --auto-accent, --auto-surface */
.nuda-chip-auto {
--auto-accent: #e4ff54;
position: relative;
width: 100%;
max-width: 280px;
font: 500 12px/1 ui-sans-serif, system-ui, sans-serif;
color: #fafafa;
}
.nuda-chip-auto__field {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px;
padding: 8px;
background: #0c0c10;
border: 1px solid var(--auto-accent);
border-radius: 10px;
}
.nuda-chip-auto__chip {
padding: 4px 10px;
background: #111114;
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 99px;
}
.nuda-chip-auto__input {
flex: 1;
min-width: 60px;
padding: 4px;
color: #fafafa;
background: transparent;
border: 0;
outline: 0;
caret-color: var(--auto-accent);
}
.nuda-chip-auto__list {
margin: 4px 0 0;
padding: 4px;
list-style: none;
background: #0c0c10;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 10px;
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
animation: nuda-dropin 0.18s ease both;
}
.nuda-chip-auto__opt {
padding: 8px 10px;
color: #a0a0a8;
border-radius: 6px;
cursor: pointer;
}
.nuda-chip-auto__opt b { color: #fafafa; font-weight: 600; }
.nuda-chip-auto__opt:hover,
.nuda-chip-auto__opt--active {
color: #fafafa;
background: rgba(228, 255, 84, 0.08);
}
@keyframes nuda-dropin {
from { opacity: 0; transform: translateY(-4px); }
to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
.nuda-chip-auto__list { animation: none; }
}How to use Chip Autocomplete Dropdown
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.