Heatmap
A copy-paste charts component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
ChartsHTMLCSSany framework
Copy into your project
HTML
<!-- Heatmap (5×7 grid — fill cell classes from your data) -->
<div class="nuda-heatmap" role="img" aria-label="Activity heatmap">
<span class="nuda-heatmap__cell is-low" style="--d: 0s"></span>
<span class="nuda-heatmap__cell is-mid" style="--d: .04s"></span>
<span class="nuda-heatmap__cell is-high" style="--d: .08s"></span>
<span class="nuda-heatmap__cell is-empty" style="--d: .12s"></span>
<!-- ...repeat for 35 cells, vary class by intensity (is-empty / is-low / is-mid / is-high) -->
</div>CSS
/* Heatmap
Activity grid (e.g. GitHub-style) with cells popping in then breathing.
Customize: --hm-color, --hm-empty, --hm-cols */
.nuda-heatmap {
--hm-color: #e4ff54;
--hm-empty: rgba(255, 255, 255, 0.04);
--hm-cols: 7;
display: grid;
grid-template-columns: repeat(var(--hm-cols), 1fr);
gap: 3px;
width: 100%;
max-width: 220px;
padding: 4px;
}
.nuda-heatmap__cell {
aspect-ratio: 1;
border-radius: 2px;
background: var(--hm-empty);
transform: scale(0.6);
opacity: 0;
animation:
nuda-heatmap-pop 0.5s cubic-bezier(0.4, 0, 0.2, 1) var(--d, 0s) forwards,
nuda-heatmap-loop 4s ease-in-out var(--d, 0s) infinite;
}
.nuda-heatmap__cell.is-low { background: rgba(228, 255, 84, 0.25); }
.nuda-heatmap__cell.is-mid { background: rgba(228, 255, 84, 0.55); }
.nuda-heatmap__cell.is-high {
background: var(--hm-color);
box-shadow: 0 0 4px rgba(228, 255, 84, 0.4);
}
@keyframes nuda-heatmap-pop {
to { transform: scale(1); opacity: 1; }
}
@keyframes nuda-heatmap-loop {
0%, 100% { filter: brightness(1); }
50% { filter: brightness(1.3); }
}
@media (prefers-reduced-motion: reduce) {
.nuda-heatmap__cell { animation: none; transform: scale(1); opacity: 1; }
}How to use Heatmap
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.