Pie Slices
A copy-paste charts component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
ChartsHTMLCSSany framework
Copy into your project
HTML
<!-- Pie Slices -->
<div class="nuda-pie" role="img" aria-label="Pie chart">
<div class="nuda-pie__disc"></div>
<div class="nuda-pie__hole"></div>
</div>CSS
/* Pie Slices
Conic-gradient pie with a slow rotate. Edit the gradient stops for your data.
Customize: --pie-size, --pie-hole, --pie-bg, the conic-gradient stops */
.nuda-pie {
--pie-size: 96px;
--pie-hole: 22px;
--pie-bg: #0e0e10;
position: relative;
width: var(--pie-size);
height: var(--pie-size);
}
.nuda-pie__disc {
position: absolute;
inset: 0;
border-radius: 50%;
/* Edit stops to match your data: color1 0 X%, color2 X% Y%, ... */
background: conic-gradient(
#e4ff54 0 35%,
rgba(228, 255, 84, 0.55) 35% 60%,
rgba(228, 255, 84, 0.25) 60% 85%,
rgba(255, 255, 255, 0.08) 85% 100%
);
animation: nuda-pie-spin 6s linear infinite;
filter: drop-shadow(0 0 8px rgba(228, 255, 84, 0.18));
}
.nuda-pie__hole {
position: absolute;
inset: var(--pie-hole);
border-radius: 50%;
background: radial-gradient(circle at center, var(--pie-bg) 60%, #1a1a1f);
border: 1px solid rgba(255, 255, 255, 0.04);
}
@keyframes nuda-pie-spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
.nuda-pie__disc { animation: none; }
}How to use Pie Slices
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.