Model Selector
A copy-paste ai / chat ui component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
AI / Chat UIHTMLCSSany framework
Copy into your project
HTML
<!-- Model Selector — pulsing online dot, name, plan badge -->
<button class="nuda-model" type="button">
<span class="nuda-model__dot"></span>
<span class="nuda-model__name">Claude Opus 4.7</span>
<span class="nuda-model__badge">Pro</span>
<svg class="nuda-model__chev" viewBox="0 0 12 12" fill="none"
stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="M3 4.5 L6 7.5 L9 4.5" />
</svg>
</button>CSS
/* Model Selector
Pill button with status dot, model name, plan badge, chevron flip on hover.
Customize: --model-accent */
.nuda-model {
--model-accent: #e4ff54;
display: inline-flex;
align-items: center;
gap: 8px;
padding: 6px 10px 6px 12px;
background: rgba(255, 255, 255, 0.04);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 8px;
color: #fafafa;
font: 600 0.875rem ui-sans-serif, system-ui, sans-serif;
cursor: pointer;
transition: border-color 0.25s, background 0.25s;
}
.nuda-model:hover {
border-color: rgba(228, 255, 84, 0.3);
background: rgba(255, 255, 255, 0.06);
}
.nuda-model__dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--model-accent);
box-shadow: 0 0 6px var(--model-accent);
animation: nuda-model-pulse 2s ease-in-out infinite;
}
.nuda-model__badge {
font: 700 0.55rem ui-sans-serif, system-ui, sans-serif;
color: #09090b;
background: var(--model-accent);
padding: 2px 6px;
border-radius: 4px;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.nuda-model__chev {
width: 12px;
height: 12px;
color: #a1a1aa;
transition: transform 0.25s;
}
.nuda-model:hover .nuda-model__chev { transform: rotate(180deg); }
@keyframes nuda-model-pulse {
0%, 100% { opacity: 0.7; }
50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
.nuda-model__dot { animation: none; }
}How to use Model Selector
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.