Dislike Button
A copy-paste comments & reactions component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Comments & ReactionsHTMLCSSany framework
Copy into your project
HTML
<button type="button" class="nuda-dislike-btn" aria-pressed="false" aria-label="Dislike">
<svg class="nuda-dislike-btn__icon" viewBox="0 0 24 24" aria-hidden="true">
<path d="M7 14V4h10l3 8v2h-7l1 4-2 2-5-6z"
fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round" />
</svg>
<span>Dislike</span>
</button>CSS
/* Dislike Button
Thumbs-down icon morphs and rotates on toggle.
Toggle aria-pressed="true" to fix the pressed state. */
.nuda-dislike-btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 7px 14px 7px 12px;
background: #0c0c10;
border: 1px solid #1c1c22;
border-radius: 999px;
color: #a0a0a8;
font-size: 12px;
font-weight: 500;
cursor: pointer;
transition: color 0.25s, border-color 0.25s;
}
.nuda-dislike-btn__icon {
width: 16px;
height: 16px;
color: #a0a0a8;
transform-origin: 50% 60%;
transition: color 0.25s, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.nuda-dislike-btn:hover { color: #fafafa; border-color: #62b6ff; }
.nuda-dislike-btn:hover .nuda-dislike-btn__icon {
color: #62b6ff;
transform: rotate(-20deg) translateY(2px);
}
.nuda-dislike-btn[aria-pressed="true"] .nuda-dislike-btn__icon {
color: #62b6ff;
fill: #62b6ff;
animation: nuda-db-morph 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.nuda-dislike-btn:focus-visible {
outline: 2px solid #e4ff54;
outline-offset: 2px;
}
@keyframes nuda-db-morph {
0% { transform: rotate(0) scale(1); }
40% { transform: rotate(-25deg) scale(0.85); }
70% { transform: rotate(10deg) scale(1.15); }
100% { transform: rotate(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
.nuda-dislike-btn,
.nuda-dislike-btn__icon { transition: none; }
.nuda-dislike-btn[aria-pressed="true"] .nuda-dislike-btn__icon { animation: none; }
}How to use Dislike Button
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.