Skip to content

Glass Stat Tile

A copy-paste glassmorphism component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

GlassmorphismHTMLCSSany framework

Revenue

$48.2k

+12.4%

Copy into your project

HTML
<div class="nuda-glass-stat">
  <div class="nuda-glass-stat__glow" aria-hidden="true"></div>
  <p class="nuda-glass-stat__label">Revenue</p>
  <p class="nuda-glass-stat__value">$48.2k</p>
  <p class="nuda-glass-stat__trend">
    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
      <path d="M3 17l6-6 4 4 8-8"/>
      <path d="M21 7v6h-6"/>
    </svg>
    +12.4%
  </p>
</div>
CSS
/* Glass Stat Tile
   KPI tile with a frosted backdrop and a drifting lime glow.
   Customize: --glass-stat-accent */

.nuda-glass-stat {
  --glass-stat-accent: #e4ff54;
  position: relative;
  width: 170px;
  padding: 16px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.nuda-glass-stat__glow {
  position: absolute;
  top: -40%;
  right: -30%;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(228, 255, 84, 0.35), transparent 70%);
  filter: blur(8px);
  animation: nuda-glass-stat-glow 5s ease-in-out infinite;
  will-change: transform, opacity;
}

.nuda-glass-stat__label {
  position: relative;
  margin: 0;
  color: rgba(250, 250, 250, 0.55);
  font: 600 0.7rem ui-sans-serif, system-ui;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nuda-glass-stat__value {
  position: relative;
  margin: 0.3rem 0 0.25rem;
  color: #fafafa;
  font: 800 1.7rem ui-sans-serif, system-ui;
  letter-spacing: -0.03em;
}

.nuda-glass-stat__trend {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  color: var(--glass-stat-accent);
  font: 700 0.74rem ui-sans-serif, system-ui;
}

.nuda-glass-stat__trend svg {
  width: 14px;
  height: 14px;
}

@keyframes nuda-glass-stat-glow {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.8; }
  50% { transform: translate(-10px, 10px) scale(1.15); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .nuda-glass-stat__glow { animation: none; }
}

How to use Glass Stat Tile

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.

More glassmorphism components

← Browse all NudaUI components