25 Tailwind CSS Button Groups
11 / 25

All 25 in 25 Tailwind CSS Button Groups

  1. 01Tailwind Split Button with Anchor-Positioned Popover Dropdown (No JS)
  2. 02Tailwind Segmented Control with Motion-Path Comet Indicator
  3. 03Tailwind Toggle Button Group with View Transitions Morphing Highlight
  4. 04Tailwind Pricing Toggle — Monthly / Yearly Billing Switch (No JS)
  5. 05Tailwind Segmented Control with Sliding Thumb (iOS Style)
  6. 06Tailwind Split Button Dropdown with Native Details Menu (Save Options)
  7. 07Tailwind Icon Button Group Toolbar with Tooltips (Rich Text Editor)
  8. 08Tailwind Pill Filter Button Group with Sliding Indicator (Anchor Positioning)
  9. 09Tailwind Toggle Button Group for Text Alignment (Radio Inputs, Live Preview)
  10. 10Tailwind Web3 Connect Wallet Button Grid (Wallet Sign-In Modal)
  11. 11Tailwind AI Model Selector Button Group (LLM Model Picker with Badges)
  12. 12Tailwind Liquid Metal Segmented Control (Animated Chrome Thumb)
  13. 13Tailwind Tab Button Group with Subgrid Underline Indicator
  14. 14Tailwind Multi-Select Chip Buttons (Tag Filter Checkboxes with Count)
  15. 15Tailwind Animated Split Button Deploy Menu (Staggered Dropdown Reveal)
  16. 16Tailwind Radio Button Group with Conic Fill Animation (Export Format Picker)
  17. 17Tailwind Retro LED Pixel Button Group (Dot-Matrix Display Buttons)
  18. 18Tailwind Hold-to-Confirm Button Group with Gradient Progress (Press and Hold)
  19. 19Tailwind Holographic Icon Segmented Control (Grid / List View Switcher)
  20. 20Tailwind 3D Vertical Button Group with Hover Depth (Perspective Stack)
  21. 21Tailwind Floating Action Button with Radial Speed Dial Menu (No JS)
  22. 22Tailwind Glitch Effect Button Group (Cyberpunk RGB-Split Audio Filter)
  23. 23Tailwind Animated Gradient Border Pill Buttons (Rotating Conic Ring)
  24. 24Tailwind Button Group with Ripple Click Effect (Radar Shockwave Feedback)
  25. 25Tailwind Button Group with Cursor-Following Spotlight Glow (Date Range Presets)
Pure TailwindMIT licensed

Tailwind AI Model Selector Button Group (LLM Model Picker with Badges)

A model picker for AI products: radio cards with a provider badge, capability chips, context window and an animated check. Each row sets one inline variable, --brand, and v4's variable shorthand does the rest — bg-(--brand) on the badge, has-checked:border-(--brand) on the row, and a color-mix() tint behind the selection — so every provider is selected in its own colour.

Live Demo
Plain CSSTailwind v4
Try it

Untitled UI Pro: 5,000+ React + Tailwind CSS v4 components · from $349 one-time

Untitled UI React · Affiliate link

Get Untitled UI Pro

The code

<section class="tbg-11 w-full min-h-svh grid place-items-center bg-tbg11-bg bg-linear-165 from-tbg11-bg to-tbg11-bg2 px-5 py-14 font-tbg11-sans text-tbg11-ink" aria-label="AI model selector demo">
  <div class="w-full max-w-[32rem] rounded-[1.25rem] border border-tbg11-line bg-tbg11-panel px-5 pt-6 pb-5 shadow-tbg11-panel sm:px-6">
    <p class="text-xs font-bold uppercase tracking-[0.16em] text-tbg11-acc">Model</p>
    <h3 id="tbg11-title" class="mt-1 mb-4.5 text-[22px] font-bold tracking-[-0.02em]">Select a model</h3>
    <div role="radiogroup" aria-labelledby="tbg11-title" class="flex flex-col gap-2">
      <label style="--brand:#10a37f" class="group/row flex min-h-16 cursor-pointer items-center gap-3.5 rounded-2xl border-[1.5px] border-tbg11-rowline bg-tbg11-row px-4 py-3 transition-[border-color,background-color] duration-200 hover:border-tbg11-hover has-checked:border-(--brand) has-checked:bg-[color-mix(in_oklab,var(--brand)_12%,var(--color-tbg11-row))] has-focus-visible:outline-3 has-focus-visible:outline-offset-2 has-focus-visible:outline-tbg11-acc motion-reduce:transition-none">
        <input type="radio" name="tbg11" class="sr-only" checked>
        <span aria-hidden="true" class="grid size-10 flex-none place-items-center rounded-xl bg-(--brand) text-[13px] font-extrabold text-white shadow-[0_4px_14px_-4px_var(--brand)]">AI</span>
        <span class="flex min-w-0 flex-col gap-1.5"><span class="text-[15px] font-semibold">GPT-class Turbo</span><span class="flex flex-wrap gap-1.5"><i class="rounded-md bg-tbg11-chip px-1.5 py-0.5 text-[10.5px] font-semibold not-italic text-tbg11-mut">Vision</i><i class="rounded-md bg-tbg11-chip px-1.5 py-0.5 text-[10.5px] font-semibold not-italic text-tbg11-mut">Tools</i></span></span>
        <span class="ml-auto font-tbg11-mono text-xs whitespace-nowrap text-tbg11-mut">128K ctx</span>
        <span aria-hidden="true" class="grid size-6 flex-none scale-75 place-items-center rounded-full border-2 border-tbg11-hover text-white opacity-40 transition duration-200 ease-[cubic-bezier(.34,1.5,.5,1)] group-has-checked/row:scale-100 group-has-checked/row:border-(--brand) group-has-checked/row:bg-(--brand) group-has-checked/row:opacity-100 motion-reduce:transition-none"><svg class="opacity-0 group-has-checked/row:opacity-100" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg></span>
      </label>
      <label style="--brand:#d97757" class="group/row flex min-h-16 cursor-pointer items-center gap-3.5 rounded-2xl border-[1.5px] border-tbg11-rowline bg-tbg11-row px-4 py-3 transition-[border-color,background-color] duration-200 hover:border-tbg11-hover has-checked:border-(--brand) has-checked:bg-[color-mix(in_oklab,var(--brand)_12%,var(--color-tbg11-row))] has-focus-visible:outline-3 has-focus-visible:outline-offset-2 has-focus-visible:outline-tbg11-acc motion-reduce:transition-none">
        <input type="radio" name="tbg11" class="sr-only">
        <span aria-hidden="true" class="grid size-10 flex-none place-items-center rounded-xl bg-(--brand) text-[13px] font-extrabold text-white shadow-[0_4px_14px_-4px_var(--brand)]">CL</span>
        <span class="flex min-w-0 flex-col gap-1.5"><span class="text-[15px] font-semibold">Claude-class Opus</span><span class="flex flex-wrap gap-1.5"><i class="rounded-md bg-tbg11-chip px-1.5 py-0.5 text-[10.5px] font-semibold not-italic text-tbg11-mut">Vision</i><i class="rounded-md bg-tbg11-chip px-1.5 py-0.5 text-[10.5px] font-semibold not-italic text-tbg11-mut">Reasoning</i></span></span>
        <span class="ml-auto font-tbg11-mono text-xs whitespace-nowrap text-tbg11-mut">200K ctx</span>
        <span aria-hidden="true" class="grid size-6 flex-none scale-75 place-items-center rounded-full border-2 border-tbg11-hover text-white opacity-40 transition duration-200 ease-[cubic-bezier(.34,1.5,.5,1)] group-has-checked/row:scale-100 group-has-checked/row:border-(--brand) group-has-checked/row:bg-(--brand) group-has-checked/row:opacity-100 motion-reduce:transition-none"><svg class="opacity-0 group-has-checked/row:opacity-100" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg></span>
      </label>
      <label style="--brand:#4285f4" class="group/row flex min-h-16 cursor-pointer items-center gap-3.5 rounded-2xl border-[1.5px] border-tbg11-rowline bg-tbg11-row px-4 py-3 transition-[border-color,background-color] duration-200 hover:border-tbg11-hover has-checked:border-(--brand) has-checked:bg-[color-mix(in_oklab,var(--brand)_12%,var(--color-tbg11-row))] has-focus-visible:outline-3 has-focus-visible:outline-offset-2 has-focus-visible:outline-tbg11-acc motion-reduce:transition-none">
        <input type="radio" name="tbg11" class="sr-only">
        <span aria-hidden="true" class="grid size-10 flex-none place-items-center rounded-xl bg-(--brand) text-[13px] font-extrabold text-white shadow-[0_4px_14px_-4px_var(--brand)]">GM</span>
        <span class="flex min-w-0 flex-col gap-1.5"><span class="text-[15px] font-semibold">Gemini-class Pro</span><span class="flex flex-wrap gap-1.5"><i class="rounded-md bg-tbg11-chip px-1.5 py-0.5 text-[10.5px] font-semibold not-italic text-tbg11-mut">Multimodal</i><i class="rounded-md bg-tbg11-chip px-1.5 py-0.5 text-[10.5px] font-semibold not-italic text-tbg11-mut">Long context</i></span></span>
        <span class="ml-auto font-tbg11-mono text-xs whitespace-nowrap text-tbg11-mut">1M ctx</span>
        <span aria-hidden="true" class="grid size-6 flex-none scale-75 place-items-center rounded-full border-2 border-tbg11-hover text-white opacity-40 transition duration-200 ease-[cubic-bezier(.34,1.5,.5,1)] group-has-checked/row:scale-100 group-has-checked/row:border-(--brand) group-has-checked/row:bg-(--brand) group-has-checked/row:opacity-100 motion-reduce:transition-none"><svg class="opacity-0 group-has-checked/row:opacity-100" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg></span>
      </label>
      <label style="--brand:#8e6fe6" class="group/row flex min-h-16 cursor-pointer items-center gap-3.5 rounded-2xl border-[1.5px] border-tbg11-rowline bg-tbg11-row px-4 py-3 transition-[border-color,background-color] duration-200 hover:border-tbg11-hover has-checked:border-(--brand) has-checked:bg-[color-mix(in_oklab,var(--brand)_12%,var(--color-tbg11-row))] has-focus-visible:outline-3 has-focus-visible:outline-offset-2 has-focus-visible:outline-tbg11-acc motion-reduce:transition-none">
        <input type="radio" name="tbg11" class="sr-only">
        <span aria-hidden="true" class="grid size-10 flex-none place-items-center rounded-xl bg-(--brand) text-[13px] font-extrabold text-white shadow-[0_4px_14px_-4px_var(--brand)]">LL</span>
        <span class="flex min-w-0 flex-col gap-1.5"><span class="text-[15px] font-semibold">Llama-class 70B</span><span class="flex flex-wrap gap-1.5"><i class="rounded-md bg-tbg11-chip px-1.5 py-0.5 text-[10.5px] font-semibold not-italic text-tbg11-mut">Open weights</i><i class="rounded-md bg-tbg11-chip px-1.5 py-0.5 text-[10.5px] font-semibold not-italic text-tbg11-mut">Fast</i></span></span>
        <span class="ml-auto font-tbg11-mono text-xs whitespace-nowrap text-tbg11-mut">64K ctx</span>
        <span aria-hidden="true" class="grid size-6 flex-none scale-75 place-items-center rounded-full border-2 border-tbg11-hover text-white opacity-40 transition duration-200 ease-[cubic-bezier(.34,1.5,.5,1)] group-has-checked/row:scale-100 group-has-checked/row:border-(--brand) group-has-checked/row:bg-(--brand) group-has-checked/row:opacity-100 motion-reduce:transition-none"><svg class="opacity-0 group-has-checked/row:opacity-100" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg></span>
      </label>
    </div>
  </div>
</section>
@import "tailwindcss";

@theme {
  --color-tbg11-bg: #0c1220;
  --color-tbg11-bg2: #0a0f1a;
  --color-tbg11-panel: #111827;
  --color-tbg11-line: #1f2b40;
  --color-tbg11-row: #0e1524;
  --color-tbg11-rowline: #1e2a3f;
  --color-tbg11-hover: #364866;
  --color-tbg11-chip: #1a2438;
  --color-tbg11-ink: #e8eefa;
  --color-tbg11-mut: #a3b4cf;
  --color-tbg11-mut: oklch(0.77 0.04 255);
  --color-tbg11-acc: #50b2f0;
  --color-tbg11-acc: oklch(0.73 0.13 235);
  --shadow-tbg11-panel: 0 34px 80px -40px rgb(0 0 0 / 0.9);
  --font-tbg11-sans: 'Geist', system-ui, sans-serif;
  --font-tbg11-mono: 'Geist Mono', ui-monospace, monospace;
}
/* Root rule: the full-bleed contract, restated so the stage is sized before the browser build compiles. */

.tbg-11 {
  width: 100%;
  min-height: 100svh;
}

Setup — do this once per project

Skip this if your project already runs Tailwind v4.

1Load Tailwind
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>

Compiles in the browser — perfect for a CodePen or a quick test, not for production.

2Add the stylesheetRequiredthe @theme block is what makes the custom utilities exist
@import "tailwindcss";

@theme {
  --color-tbg11-bg: #0c1220;
  --color-tbg11-bg2: #0a0f1a;
  --color-tbg11-panel: #111827;
  --color-tbg11-line: #1f2b40;
  --color-tbg11-row: #0e1524;
  --color-tbg11-rowline: #1e2a3f;
  --color-tbg11-hover: #364866;
  --color-tbg11-chip: #1a2438;
  --color-tbg11-ink: #e8eefa;
  --color-tbg11-mut: #a3b4cf;
  --color-tbg11-mut: oklch(0.77 0.04 255);
  --color-tbg11-acc: #50b2f0;
  --color-tbg11-acc: oklch(0.73 0.13 235);
  --shadow-tbg11-panel: 0 34px 80px -40px rgb(0 0 0 / 0.9);
  --font-tbg11-sans: 'Geist', system-ui, sans-serif;
  --font-tbg11-mono: 'Geist Mono', ui-monospace, monospace;
}
/* Root rule: the full-bleed contract, restated so the stage is sized before the browser build compiles. */

.tbg-11 {
  width: 100%;
  min-height: 100svh;
}
3Fonts used by this demooptional — skip if you have your own type stack
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Geist:wght@400..800&family=Geist+Mono:wght@400..600&display=swap">

What changed in the port

Which parts became utilities, which stayed CSS, and why.

  • background:var(--brand) became v4's shorthand bg-(--brand); the checked tint is the original color-mix() in an arbitrary value.
  • The bordered pseudo-element tick became an SVG check that animates with group-has-checked/row:.
  • UI upgrade: the selected row, ring and check now take the provider's own colour instead of one shared accent, so the choice reads at a glance.
  • UI upgrade: chips wrap on narrow screens, context sizes use a mono face for scanning, and muted text rose to 7:1.
Paste this into ChatGPT, Claude, Cursor, or any coding assistant. The block below is pre-framed with everything the AI needs to integrate this demo into your project — markup, styles, scoping notes, and the source URL. Hit Copy and paste straight into your chat.
Here's a working CSS demo from CodeFronts. Use it as-is or adapt to your framework. All classes are scoped under a unique prefix so the code won't collide with your existing styles. MIT licensed.
Demo: Tailwind AI Model Selector Button Group (LLM Model Picker with Badges)
Source: https://codefronts.com/components/tailwind-css-button-groups/tailwind-ai-model-selector-button-group/

A model picker for AI products: radio cards with a provider badge, capability chips, context window and an animated check. Each row sets one inline variable, --brand, and v4's variable shorthand does the rest — bg-(--brand) on the badge, has-checked:border-(--brand) on the row, and a color-mix() tint behind the selection — so every provider is selected in its own colour.
## HTML
```html
<section class="tbg-11 w-full min-h-svh grid place-items-center bg-tbg11-bg bg-linear-165 from-tbg11-bg to-tbg11-bg2 px-5 py-14 font-tbg11-sans text-tbg11-ink" aria-label="AI model selector demo">
  <div class="w-full max-w-[32rem] rounded-[1.25rem] border border-tbg11-line bg-tbg11-panel px-5 pt-6 pb-5 shadow-tbg11-panel sm:px-6">
    <p class="text-xs font-bold uppercase tracking-[0.16em] text-tbg11-acc">Model</p>
    <h3 id="tbg11-title" class="mt-1 mb-4.5 text-[22px] font-bold tracking-[-0.02em]">Select a model</h3>
    <div role="radiogroup" aria-labelledby="tbg11-title" class="flex flex-col gap-2">
      <label style="--brand:#10a37f" class="group/row flex min-h-16 cursor-pointer items-center gap-3.5 rounded-2xl border-[1.5px] border-tbg11-rowline bg-tbg11-row px-4 py-3 transition-[border-color,background-color] duration-200 hover:border-tbg11-hover has-checked:border-(--brand) has-checked:bg-[color-mix(in_oklab,var(--brand)_12%,var(--color-tbg11-row))] has-focus-visible:outline-3 has-focus-visible:outline-offset-2 has-focus-visible:outline-tbg11-acc motion-reduce:transition-none">
        <input type="radio" name="tbg11" class="sr-only" checked>
        <span aria-hidden="true" class="grid size-10 flex-none place-items-center rounded-xl bg-(--brand) text-[13px] font-extrabold text-white shadow-[0_4px_14px_-4px_var(--brand)]">AI</span>
        <span class="flex min-w-0 flex-col gap-1.5"><span class="text-[15px] font-semibold">GPT-class Turbo</span><span class="flex flex-wrap gap-1.5"><i class="rounded-md bg-tbg11-chip px-1.5 py-0.5 text-[10.5px] font-semibold not-italic text-tbg11-mut">Vision</i><i class="rounded-md bg-tbg11-chip px-1.5 py-0.5 text-[10.5px] font-semibold not-italic text-tbg11-mut">Tools</i></span></span>
        <span class="ml-auto font-tbg11-mono text-xs whitespace-nowrap text-tbg11-mut">128K ctx</span>
        <span aria-hidden="true" class="grid size-6 flex-none scale-75 place-items-center rounded-full border-2 border-tbg11-hover text-white opacity-40 transition duration-200 ease-[cubic-bezier(.34,1.5,.5,1)] group-has-checked/row:scale-100 group-has-checked/row:border-(--brand) group-has-checked/row:bg-(--brand) group-has-checked/row:opacity-100 motion-reduce:transition-none"><svg class="opacity-0 group-has-checked/row:opacity-100" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg></span>
      </label>
      <label style="--brand:#d97757" class="group/row flex min-h-16 cursor-pointer items-center gap-3.5 rounded-2xl border-[1.5px] border-tbg11-rowline bg-tbg11-row px-4 py-3 transition-[border-color,background-color] duration-200 hover:border-tbg11-hover has-checked:border-(--brand) has-checked:bg-[color-mix(in_oklab,var(--brand)_12%,var(--color-tbg11-row))] has-focus-visible:outline-3 has-focus-visible:outline-offset-2 has-focus-visible:outline-tbg11-acc motion-reduce:transition-none">
        <input type="radio" name="tbg11" class="sr-only">
        <span aria-hidden="true" class="grid size-10 flex-none place-items-center rounded-xl bg-(--brand) text-[13px] font-extrabold text-white shadow-[0_4px_14px_-4px_var(--brand)]">CL</span>
        <span class="flex min-w-0 flex-col gap-1.5"><span class="text-[15px] font-semibold">Claude-class Opus</span><span class="flex flex-wrap gap-1.5"><i class="rounded-md bg-tbg11-chip px-1.5 py-0.5 text-[10.5px] font-semibold not-italic text-tbg11-mut">Vision</i><i class="rounded-md bg-tbg11-chip px-1.5 py-0.5 text-[10.5px] font-semibold not-italic text-tbg11-mut">Reasoning</i></span></span>
        <span class="ml-auto font-tbg11-mono text-xs whitespace-nowrap text-tbg11-mut">200K ctx</span>
        <span aria-hidden="true" class="grid size-6 flex-none scale-75 place-items-center rounded-full border-2 border-tbg11-hover text-white opacity-40 transition duration-200 ease-[cubic-bezier(.34,1.5,.5,1)] group-has-checked/row:scale-100 group-has-checked/row:border-(--brand) group-has-checked/row:bg-(--brand) group-has-checked/row:opacity-100 motion-reduce:transition-none"><svg class="opacity-0 group-has-checked/row:opacity-100" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg></span>
      </label>
      <label style="--brand:#4285f4" class="group/row flex min-h-16 cursor-pointer items-center gap-3.5 rounded-2xl border-[1.5px] border-tbg11-rowline bg-tbg11-row px-4 py-3 transition-[border-color,background-color] duration-200 hover:border-tbg11-hover has-checked:border-(--brand) has-checked:bg-[color-mix(in_oklab,var(--brand)_12%,var(--color-tbg11-row))] has-focus-visible:outline-3 has-focus-visible:outline-offset-2 has-focus-visible:outline-tbg11-acc motion-reduce:transition-none">
        <input type="radio" name="tbg11" class="sr-only">
        <span aria-hidden="true" class="grid size-10 flex-none place-items-center rounded-xl bg-(--brand) text-[13px] font-extrabold text-white shadow-[0_4px_14px_-4px_var(--brand)]">GM</span>
        <span class="flex min-w-0 flex-col gap-1.5"><span class="text-[15px] font-semibold">Gemini-class Pro</span><span class="flex flex-wrap gap-1.5"><i class="rounded-md bg-tbg11-chip px-1.5 py-0.5 text-[10.5px] font-semibold not-italic text-tbg11-mut">Multimodal</i><i class="rounded-md bg-tbg11-chip px-1.5 py-0.5 text-[10.5px] font-semibold not-italic text-tbg11-mut">Long context</i></span></span>
        <span class="ml-auto font-tbg11-mono text-xs whitespace-nowrap text-tbg11-mut">1M ctx</span>
        <span aria-hidden="true" class="grid size-6 flex-none scale-75 place-items-center rounded-full border-2 border-tbg11-hover text-white opacity-40 transition duration-200 ease-[cubic-bezier(.34,1.5,.5,1)] group-has-checked/row:scale-100 group-has-checked/row:border-(--brand) group-has-checked/row:bg-(--brand) group-has-checked/row:opacity-100 motion-reduce:transition-none"><svg class="opacity-0 group-has-checked/row:opacity-100" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg></span>
      </label>
      <label style="--brand:#8e6fe6" class="group/row flex min-h-16 cursor-pointer items-center gap-3.5 rounded-2xl border-[1.5px] border-tbg11-rowline bg-tbg11-row px-4 py-3 transition-[border-color,background-color] duration-200 hover:border-tbg11-hover has-checked:border-(--brand) has-checked:bg-[color-mix(in_oklab,var(--brand)_12%,var(--color-tbg11-row))] has-focus-visible:outline-3 has-focus-visible:outline-offset-2 has-focus-visible:outline-tbg11-acc motion-reduce:transition-none">
        <input type="radio" name="tbg11" class="sr-only">
        <span aria-hidden="true" class="grid size-10 flex-none place-items-center rounded-xl bg-(--brand) text-[13px] font-extrabold text-white shadow-[0_4px_14px_-4px_var(--brand)]">LL</span>
        <span class="flex min-w-0 flex-col gap-1.5"><span class="text-[15px] font-semibold">Llama-class 70B</span><span class="flex flex-wrap gap-1.5"><i class="rounded-md bg-tbg11-chip px-1.5 py-0.5 text-[10.5px] font-semibold not-italic text-tbg11-mut">Open weights</i><i class="rounded-md bg-tbg11-chip px-1.5 py-0.5 text-[10.5px] font-semibold not-italic text-tbg11-mut">Fast</i></span></span>
        <span class="ml-auto font-tbg11-mono text-xs whitespace-nowrap text-tbg11-mut">64K ctx</span>
        <span aria-hidden="true" class="grid size-6 flex-none scale-75 place-items-center rounded-full border-2 border-tbg11-hover text-white opacity-40 transition duration-200 ease-[cubic-bezier(.34,1.5,.5,1)] group-has-checked/row:scale-100 group-has-checked/row:border-(--brand) group-has-checked/row:bg-(--brand) group-has-checked/row:opacity-100 motion-reduce:transition-none"><svg class="opacity-0 group-has-checked/row:opacity-100" viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg></span>
      </label>
    </div>
  </div>
</section>
```
## CSS
```css
@import "tailwindcss";

@theme {
  --color-tbg11-bg: #0c1220;
  --color-tbg11-bg2: #0a0f1a;
  --color-tbg11-panel: #111827;
  --color-tbg11-line: #1f2b40;
  --color-tbg11-row: #0e1524;
  --color-tbg11-rowline: #1e2a3f;
  --color-tbg11-hover: #364866;
  --color-tbg11-chip: #1a2438;
  --color-tbg11-ink: #e8eefa;
  --color-tbg11-mut: #a3b4cf;
  --color-tbg11-mut: oklch(0.77 0.04 255);
  --color-tbg11-acc: #50b2f0;
  --color-tbg11-acc: oklch(0.73 0.13 235);
  --shadow-tbg11-panel: 0 34px 80px -40px rgb(0 0 0 / 0.9);
  --font-tbg11-sans: 'Geist', system-ui, sans-serif;
  --font-tbg11-mono: 'Geist Mono', ui-monospace, monospace;
}
/* Root rule: the full-bleed contract, restated so the stage is sized before the browser build compiles. */

.tbg-11 {
  width: 100%;
  min-height: 100svh;
}
```

How this works

One variable per row. The row declares its brand colour inline; utilities read it:

<label style="--brand:#10a37f" class="group/row
  has-checked:border-(--brand)
  has-checked:bg-[color-mix(in_oklab,var(--brand)_12%,var(--color-tbg11-row))]">
  <span class="bg-(--brand) shadow-[0_4px_14px_-4px_var(--brand)]">AI</span>

The check is an SVG that sits at scale-75 opacity-40 as an empty ring and springs to full size with a filled background when its row is checked.

Make it yours

  • Add a provider: copy a row, change --brand, badge letters and the chips.
  • Single accent instead of brand colours: replace (--brand) with tbg11-acc throughout.
  • Disabled model: add disabled to the input and has-disabled:opacity-50 has-disabled:cursor-not-allowed to the row.

Gotchas — read before shipping

  • Model and company names are trademarks; the “-class” labels here are generic placeholders.
  • Brand colours vary in contrast — check white badge text on each one.
  • Keep the context window as text, not only a badge, so it is announced with the option.

Browser support

ChromeSafariFirefoxEdge
111+16.4+128+111+

color-mix() and :has() are Baseline 2023; Tailwind v4 sets the floor.

Techniques used in this demo

Utilitiesfirst-class utility or variant

Theme tokensset in @theme, used by a utility

Search CodeFronts

Loading…