Section

Model Comparison — Sharp Glassmorphism

Frosted-glass LLM comparison panel floating over a vivid animated gradient mesh — three models compared side by side with luminous edges, gradient metric bars, and a glowing winner highlight that responds to the 'Best for' metric selector. Requires a colored backdrop behind the panel for the glass to read.

  • Section
  • Tailwind
  • HTML
  • MIT

What it does

Capabilities

  • Side-by-side frosted-glass model cards
  • Animated gradient metric bars
  • Gradient mesh backdrop with cyan glow accents
  • Live recommendation footer
  • Backdrop blur and luminous edges
  • Radiogroup semantics with aria-checked
  • Keyboard accessible controls

Preview

Live section

Interactive preview
Open preview
9:41 100%
devsnips.site/library/tailwind/sections/ai-product/model-comparison/sharp-glassmorphism/
fluid · no fixed width 100%
Dependencies: Tailwind CSS (CDN) · Google Fonts: Sora, JetBrains Mono Responsive · Keyboard-ready

Install

Add to your project

terminal
npx devsnips add Tailwind/Sections/AI-Product/model-comparison/sharp-glassmorphism
registry path: Tailwind/Sections/AI-Product/model-comparison/sharp-glassmorphism

Source

Implementation

code.html
<!--
Snippet Name: Model Comparison — Sharp Glassmorphism
Description: Frosted-glass LLM comparison panel over a vibrant gradient mesh, with gradient winner highlight, glowing cyan accents, and animated metric bars that respond to the "Best for" metric selector.
Author: DevSnips Contributors
Usage Example: Drop into a vivid app shell to compare LLMs. The metric selector and winner highlight are fully wired in preview.html. Requires a colored backdrop behind the panel for the glass to read.
-->
<div class="relative w-full max-w-5xl" data-cmp="sg">

  <!-- Glass panel -->
  <div class="relative overflow-hidden rounded-2xl border border-white/20 bg-white/10 shadow-[0_8px_40px_-12px_rgba(168,85,247,0.5)] backdrop-blur-2xl">
    <!-- Top highlight -->
    <div class="pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-white/50 to-transparent" aria-hidden="true"></div>

    <!-- Header -->
    <div class="flex flex-col gap-3 border-b border-white/15 px-5 py-4 sm:flex-row sm:items-center sm:justify-between">
      <div class="flex items-center gap-3">
        <div class="sg-glow flex h-10 w-10 items-center justify-center rounded-xl border border-white/30 bg-white/20 text-white backdrop-blur">
          <svg class="h-5 w-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="3" y="4" width="7" height="16" /><rect x="14" y="4" width="7" height="16" /><path d="M10 12h4" /></svg>
        </div>
        <div class="leading-tight">
          <p class="font-sora text-[15px] font-semibold text-white">Model Arena</p>
          <p class="sg-mono mt-1 flex items-center gap-1.5 text-[11px] text-white/70">
            <span class="sg-dot"></span>3 models · live benchmark
          </p>
        </div>
      </div>
      <div class="flex items-center gap-2">
        <span class="sg-mono rounded-lg border border-white/20 bg-white/10 px-2.5 py-1.5 text-[11px] text-white/80 backdrop-blur">Updated 02:14</span>
        <button type="button" aria-label="Export comparison" class="sg-glow flex h-9 w-9 items-center justify-center rounded-lg border border-white/20 bg-white/10 text-white/80 backdrop-blur transition-colors hover:bg-white/20 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/60">
          <svg class="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M12 3v12m0 0l-4-4m4 4l4-4M5 21h14" /></svg>
        </button>
      </div>
    </div>

    <!-- Best-for metric selector -->
    <div class="border-b border-white/15 px-5 py-4">
      <p class="sg-mono mb-2 text-[11px] uppercase tracking-wider text-white/60">Highlight best for</p>
      <div role="radiogroup" aria-label="Highlight best model for metric" class="flex flex-wrap gap-2">
        <button type="button" role="radio" aria-checked="true" data-metric="quality" class="cmp-metric sg-mono rounded-full border border-white/20 bg-white/10 px-3 py-1.5 text-[11px] text-white/85 backdrop-blur transition-colors hover:bg-white/20 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/60">Quality</button>
        <button type="button" role="radio" aria-checked="false" data-metric="speed" class="cmp-metric sg-mono rounded-full border border-white/20 bg-white/10 px-3 py-1.5 text-[11px] text-white/85 backdrop-blur transition-colors hover:bg-white/20 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/60">Speed</button>
        <button type="button" role="radio" aria-checked="false" data-metric="context" class="cmp-metric sg-mono rounded-full border border-white/20 bg-white/10 px-3 py-1.5 text-[11px] text-white/85 backdrop-blur transition-colors hover:bg-white/20 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/60">Context</button>
        <button type="button" role="radio" aria-checked="false" data-metric="cost" class="cmp-metric sg-mono rounded-full border border-white/20 bg-white/10 px-3 py-1.5 text-[11px] text-white/85 backdrop-blur transition-colors hover:bg-white/20 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/60">Cheapest</button>
      </div>
    </div>

    <!-- Model cards -->
    <div class="grid gap-px sm:grid-cols-3" data-cmp-grid>
      <!-- GPT-Snip -->
      <article class="cmp-card relative border-b border-white/15 px-5 py-5 sm:border-b-0 sm:border-r sm:[&:last-child]:border-r-0" data-model="gpt" data-quality="92" data-speed="58" data-context="78" data-cost="80" data-best="quality">
        <div class="absolute inset-0 -z-10 bg-gradient-to-br from-fuchsia-500/10 to-transparent opacity-0 transition-opacity duration-500 cmp-glowbg" aria-hidden="true"></div>
        <div class="flex items-center justify-between">
          <div class="flex items-center gap-2">
            <span class="sg-glow flex h-8 w-8 items-center justify-center rounded-lg border border-white/30 bg-white/20 font-sora text-[12px] font-semibold text-white backdrop-blur">G</span>
            <p class="font-sora text-[14px] font-semibold text-white">GPT-Snip</p>
          </div>
          <span class="cmp-winner sg-mono hidden items-center gap-1 rounded-full bg-gradient-to-r from-fuchsia-500/40 to-indigo-500/40 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider text-white backdrop-blur"><span class="sg-dot"></span>Best</span>
        </div>
        <dl class="mt-5 space-y-4">
          <div>
            <dt class="flex items-baseline justify-between"><span class="sg-mono text-[10px] uppercase tracking-wider text-white/60">Context</span><span class="font-sora text-[15px] font-semibold text-white">128K</span></dt>
            <dd class="mt-1.5 h-1.5 overflow-hidden rounded-full bg-white/10"><div class="cmp-bar h-full w-0 rounded-full bg-gradient-to-r from-fuchsia-400 to-indigo-400" data-fill="78"></div></dd>
          </div>
          <div>
            <dt class="flex items-baseline justify-between"><span class="sg-mono text-[10px] uppercase tracking-wider text-white/60">Speed</span><span class="font-sora text-[15px] font-semibold text-white">58 <span class="text-white/50">t/s</span></span></dt>
            <dd class="mt-1.5 h-1.5 overflow-hidden rounded-full bg-white/10"><div class="cmp-bar h-full w-0 rounded-full bg-gradient-to-r from-fuchsia-400 to-indigo-400" data-fill="58"></div></dd>
          </div>
          <div>
            <dt class="flex items-baseline justify-between"><span class="sg-mono text-[10px] uppercase tracking-wider text-white/60">Cost / 1M</span><span class="font-sora text-[15px] font-semibold text-white">$8.00</span></dt>
            <dd class="mt-1.5 h-1.5 overflow-hidden rounded-full bg-white/10"><div class="cmp-bar h-full w-0 rounded-full bg-gradient-to-r from-fuchsia-400 to-indigo-400" data-fill="80"></div></dd>
          </div>
          <div>
            <dt class="flex items-baseline justify-between"><span class="sg-mono text-[10px] uppercase tracking-wider text-white/60">Quality</span><span class="font-sora text-[15px] font-semibold text-white">92</span></dt>
            <dd class="mt-1.5 h-1.5 overflow-hidden rounded-full bg-white/10"><div class="cmp-bar h-full w-0 rounded-full bg-gradient-to-r from-fuchsia-400 to-indigo-400" data-fill="92"></div></dd>
          </div>
        </dl>
        <p class="sg-mono mt-5 rounded-lg border border-white/15 bg-white/5 px-2.5 py-1.5 text-[11px] leading-snug text-white/80 backdrop-blur">Best for complex reasoning &amp; long docs.</p>
      </article>

      <!-- Claude-Snip -->
      <article class="cmp-card relative border-b border-white/15 px-5 py-5 sm:border-b-0 sm:border-r sm:[&:last-child]:border-r-0" data-model="claude" data-quality="88" data-speed="72" data-context="95" data-cost="60" data-best="context">
        <div class="absolute inset-0 -z-10 bg-gradient-to-br from-cyan-500/10 to-transparent opacity-0 transition-opacity duration-500 cmp-glowbg" aria-hidden="true"></div>
        <div class="flex items-center justify-between">
          <div class="flex items-center gap-2">
            <span class="sg-glow flex h-8 w-8 items-center justify-center rounded-lg border border-white/30 bg-white/20 font-sora text-[12px] font-semibold text-white backdrop-blur">C</span>
            <p class="font-sora text-[14px] font-semibold text-white">Claude-Snip</p>
          </div>
          <span class="cmp-winner sg-mono hidden items-center gap-1 rounded-full bg-gradient-to-r from-fuchsia-500/40 to-indigo-500/40 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider text-white backdrop-blur"><span class="sg-dot"></span>Best</span>
        </div>
        <dl class="mt-5 space-y-4">
          <div>
            <dt class="flex items-baseline justify-between"><span class="sg-mono text-[10px] uppercase tracking-wider text-white/60">Context</span><span class="font-sora text-[15px] font-semibold text-white">200K</span></dt>
            <dd class="mt-1.5 h-1.5 overflow-hidden rounded-full bg-white/10"><div class="cmp-bar h-full w-0 rounded-full bg-gradient-to-r from-cyan-400 to-fuchsia-400" data-fill="95"></div></dd>
          </div>
          <div>
            <dt class="flex items-baseline justify-between"><span class="sg-mono text-[10px] uppercase tracking-wider text-white/60">Speed</span><span class="font-sora text-[15px] font-semibold text-white">72 <span class="text-white/50">t/s</span></span></dt>
            <dd class="mt-1.5 h-1.5 overflow-hidden rounded-full bg-white/10"><div class="cmp-bar h-full w-0 rounded-full bg-gradient-to-r from-cyan-400 to-fuchsia-400" data-fill="72"></div></dd>
          </div>
          <div>
            <dt class="flex items-baseline justify-between"><span class="sg-mono text-[10px] uppercase tracking-wider text-white/60">Cost / 1M</span><span class="font-sora text-[15px] font-semibold text-white">$3.00</span></dt>
            <dd class="mt-1.5 h-1.5 overflow-hidden rounded-full bg-white/10"><div class="cmp-bar h-full w-0 rounded-full bg-gradient-to-r from-cyan-400 to-fuchsia-400" data-fill="60"></div></dd>
          </div>
          <div>
            <dt class="flex items-baseline justify-between"><span class="sg-mono text-[10px] uppercase tracking-wider text-white/60">Quality</span><span class="font-sora text-[15px] font-semibold text-white">88</span></dt>
            <dd class="mt-1.5 h-1.5 overflow-hidden rounded-full bg-white/10"><div class="cmp-bar h-full w-0 rounded-full bg-gradient-to-r from-cyan-400 to-fuchsia-400" data-fill="88"></div></dd>
          </div>
        </dl>
        <p class="sg-mono mt-5 rounded-lg border border-white/15 bg-white/5 px-2.5 py-1.5 text-[11px] leading-snug text-white/80 backdrop-blur">Best for big context &amp; careful writing.</p>
      </article>

      <!-- Llama-Snip -->
      <article class="cmp-card relative px-5 py-5" data-model="llama" data-quality="74" data-speed="96" data-context="55" data-cost="95" data-best="cost">
        <div class="absolute inset-0 -z-10 bg-gradient-to-br from-indigo-500/10 to-transparent opacity-0 transition-opacity duration-500 cmp-glowbg" aria-hidden="true"></div>
        <div class="flex items-center justify-between">
          <div class="flex items-center gap-2">
            <span class="sg-glow flex h-8 w-8 items-center justify-center rounded-lg border border-white/30 bg-white/20 font-sora text-[12px] font-semibold text-white backdrop-blur">L</span>
            <p class="font-sora text-[14px] font-semibold text-white">Llama-Snip</p>
          </div>
          <span class="cmp-winner sg-mono hidden items-center gap-1 rounded-full bg-gradient-to-r from-fuchsia-500/40 to-indigo-500/40 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider text-white backdrop-blur"><span class="sg-dot"></span>Best</span>
        </div>
        <dl class="mt-5 space-y-4">
          <div>
            <dt class="flex items-baseline justify-between"><span class="sg-mono text-[10px] uppercase tracking-wider text-white/60">Context</span><span class="font-sora text-[15px] font-semibold text-white">64K</span></dt>
            <dd class="mt-1.5 h-1.5 overflow-hidden rounded-full bg-white/10"><div class="cmp-bar h-full w-0 rounded-full bg-gradient-to-r from-indigo-400 to-cyan-400" data-fill="55"></div></dd>
          </div>
          <div>
            <dt class="flex items-baseline justify-between"><span class="sg-mono text-[10px] uppercase tracking-wider text-white/60">Speed</span><span class="font-sora text-[15px] font-semibold text-white">96 <span class="text-white/50">t/s</span></span></dt>
            <dd class="mt-1.5 h-1.5 overflow-hidden rounded-full bg-white/10"><div class="cmp-bar h-full w-0 rounded-full bg-gradient-to-r from-indigo-400 to-cyan-400" data-fill="96"></div></dd>
          </div>
          <div>
            <dt class="flex items-baseline justify-between"><span class="sg-mono text-[10px] uppercase tracking-wider text-white/60">Cost / 1M</span><span class="font-sora text-[15px] font-semibold text-white">$0.40</span></dt>
            <dd class="mt-1.5 h-1.5 overflow-hidden rounded-full bg-white/10"><div class="cmp-bar h-full w-0 rounded-full bg-gradient-to-r from-indigo-400 to-cyan-400" data-fill="95"></div></dd>
          </div>
          <div>
            <dt class="flex items-baseline justify-between"><span class="sg-mono text-[10px] uppercase tracking-wider text-white/60">Quality</span><span class="font-sora text-[15px] font-semibold text-white">74</span></dt>
            <dd class="mt-1.5 h-1.5 overflow-hidden rounded-full bg-white/10"><div class="cmp-bar h-full w-0 rounded-full bg-gradient-to-r from-indigo-400 to-cyan-400" data-fill="74"></div></dd>
          </div>
        </dl>
        <p class="sg-mono mt-5 rounded-lg border border-white/15 bg-white/5 px-2.5 py-1.5 text-[11px] leading-snug text-white/80 backdrop-blur">Best for cheap, fast bulk jobs.</p>
      </article>
    </div>

    <!-- Footer recommendation -->
    <div class="flex flex-col gap-3 border-t border-white/15 px-5 py-4 sm:flex-row sm:items-center sm:justify-between" data-cmp-rec>
      <div class="flex items-center gap-2">
        <span class="sg-dot"></span>
        <p class="font-sora text-[13px] text-white/85">Recommended: <span data-rec-name class="font-semibold text-white">GPT-Snip</span> wins on <span data-rec-metric class="font-semibold text-white">quality</span>.</p>
      </div>
      <button type="button" class="sg-glow font-sora flex shrink-0 items-center gap-2 rounded-xl border border-white/30 bg-gradient-to-r from-fuchsia-500 to-indigo-500 px-4 py-2 text-[13px] font-semibold text-white transition-opacity hover:opacity-90 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/60">Pick this model →</button>
    </div>
  </div>

  <style>
    [data-cmp="sg"] .sg-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
    [data-cmp="sg"] .font-sora { font-family: 'Sora', sans-serif; }
    [data-cmp="sg"] .sg-dot { display: inline-block; height: 6px; width: 6px; border-radius: 9999px; background: #6ee7ff; box-shadow: 0 0 8px #6ee7ff; }
    [data-cmp="sg"] .sg-glow { box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 4px 20px -4px rgba(168,85,247,0.5); }
    [data-cmp="sg"] .cmp-card { transition: background .4s ease; }
    [data-cmp="sg"] .cmp-card.is-winner { background: rgba(255,255,255,0.08); }
    [data-cmp="sg"] .cmp-card.is-winner .cmp-glowbg { opacity: 1; }
    [data-cmp="sg"] .cmp-card.is-winner .cmp-winner { display: inline-flex !important; }
    [data-cmp="sg"] .cmp-bar { transition: width .7s cubic-bezier(.2,.8,.2,1); }
    [data-cmp="sg"] .cmp-metric[aria-checked="true"] { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.2); }
  </style>

  <script>
    (function () {
      var root = document.currentScript.closest('[data-cmp="sg"]');
      if (!root) return;
      var cards = Array.prototype.slice.call(root.querySelectorAll('[data-cmp-grid] .cmp-card'));
      var metrics = Array.prototype.slice.call(root.querySelectorAll('.cmp-metric'));
      var recName = root.querySelector('[data-rec-name]');
      var recMetric = root.querySelector('[data-rec-metric]');
      if (!cards.length || !metrics.length) return;

      function valueFor(card, metric) {
        var v = parseFloat(card.getAttribute('data-' + metric));
        if (metric === 'cost') v = 100 - v;
        return v;
      }

      function applyMetric(metric) {
        var best = cards[0], bestVal = -1;
        cards.forEach(function (c) {
          var v = valueFor(c, metric);
          if (v > bestVal) { bestVal = v; best = c; }
          c.classList.remove('is-winner');
        });
        best.classList.add('is-winner');

        var name = best.querySelector('p.font-sora').textContent.trim();
        if (recName) recName.textContent = name;
        if (recMetric) recMetric.textContent = metric === 'cost' ? 'price' : metric;

        cards.forEach(function (c) {
          c.querySelectorAll('.cmp-bar').forEach(function (bar) { bar.style.width = '0%'; });
        });
        requestAnimationFrame(function () {
          cards.forEach(function (c) {
            c.querySelectorAll('.cmp-bar').forEach(function (bar) {
              bar.style.width = bar.getAttribute('data-fill') + '%';
            });
          });
        });
      }

      metrics.forEach(function (m) {
        m.addEventListener('click', function () {
          metrics.forEach(function (x) { x.setAttribute('aria-checked', 'false'); });
          m.setAttribute('aria-checked', 'true');
          applyMetric(m.getAttribute('data-metric'));
        });
      });

      var active = metrics.filter(function (m) { return m.getAttribute('aria-checked') === 'true'; })[0] || metrics[0];
      applyMetric(active.getAttribute('data-metric'));
    })();
  </script>
</div>
218 lines UTF-8 · LF · Spaces: 2
DevSnips AI ready Claude · Cursor · Windsurf

Agent skill & Model Context Protocol

Pass this section straight into your AI workflow. DevSnips exposes each resource as a structured, addressable registry entry, so your agent installs the real files instead of approximating them.

devsnips://sections/ai-product/model-comparison/sharp-glassmorphism
Prompt instruction
I want to use this DevSnips resource in production:

Page:
https://devsnips.site/library/tailwind/sections/ai-product/model-comparison/sharp-glassmorphism/

Install: npx devsnips add
Tailwind/Sections/AI-Product/model-comparison/sharp-glassmorphism

This is the Model Comparison — Sharp Glassmorphism — Frosted-glass LLM comparison panel floating over a vivid animated gradient mesh — three models compared side by side with luminous edges, gradient metric bars, and a glowing winner highlight that responds to the 'Best for' metric selector. Requires a colored backdrop behind the panel for the glass to read.

Use this DevSnips resource as the starting point for my project.
Adapt it to my project's stack and conventions, fix any issues,
and make it production-ready while preserving its intended design
and behavior.

Paste into ChatGPT, Claude or your agent — it already carries the page URL and the exact install path.

Resource URI
devsnips://sections/ai-product/model-comparison/sharp-glassmorphism