System Indicator
A copy-paste theme toggle component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Theme ToggleHTMLCSSany framework
System themeFollowing dark
Copy into your project
HTML
<!-- System Indicator — shows that "auto" is following the OS preference -->
<div class="nuda-sysind">
<div class="nuda-sysind__icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="3" y="5" width="18" height="14" rx="2" />
<path d="M3 12 L21 12" />
</svg>
</div>
<div class="nuda-sysind__info">
<span class="nuda-sysind__label">System theme</span>
<span class="nuda-sysind__value">Following <i>dark</i></span>
</div>
<span class="nuda-sysind__pulse"></span>
</div>CSS
/* System Indicator
Pill showing "auto" mode is active and which OS theme is currently mirrored.
Customize: --sys-accent */
.nuda-sysind {
--sys-accent: #e4ff54;
display: inline-flex;
align-items: center;
gap: 12px;
padding: 9px 12px 9px 10px;
background: rgba(228, 255, 84, 0.06);
border: 1px solid rgba(228, 255, 84, 0.2);
border-radius: 10px;
position: relative;
}
.nuda-sysind__icon {
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
background: rgba(228, 255, 84, 0.12);
color: var(--sys-accent);
border-radius: 6px;
flex-shrink: 0;
}
.nuda-sysind__icon svg { width: 15px; height: 15px; }
.nuda-sysind__info {
display: flex;
flex-direction: column;
line-height: 1;
}
.nuda-sysind__label {
font: 600 0.625rem ui-sans-serif, system-ui, sans-serif;
color: #a1a1aa;
text-transform: uppercase;
letter-spacing: 0.06em;
}
.nuda-sysind__value {
font: 700 0.875rem ui-sans-serif, system-ui, sans-serif;
color: #fafafa;
margin-top: 3px;
}
.nuda-sysind__value i {
font-style: normal;
color: var(--sys-accent);
font-weight: 600;
}
.nuda-sysind__pulse {
position: absolute;
top: 10px;
right: 10px;
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--sys-accent);
box-shadow: 0 0 6px var(--sys-accent);
}
.nuda-sysind__pulse::after {
content: "";
position: absolute;
inset: 0;
border-radius: 50%;
background: var(--sys-accent);
animation: nuda-sys-pulse 1.6s ease-out infinite;
}
@keyframes nuda-sys-pulse {
0% { transform: scale(1); opacity: 0.6; }
100% { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
.nuda-sysind__pulse::after { animation: none; }
}How to use System Indicator
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.