Like button

Heart toggle with a small pop animation and a counter that goes up.

CSS onlyAnimation
BackgroundGridAccent

Corners

SharpDefaultRound

Shadow

NoneNoneStrong

Motion

NoneDefaultBounce
<style>
.ux-like{display:inline-flex;align-items:center;gap:10px;cursor:pointer;font:600 15px system-ui;color:var(--muted,#6b6f7b)}
.ux-like input{position:absolute;opacity:0;pointer-events:none}
.ux-like-b{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;border:1px solid var(--line,#cfd2da);background:var(--bg,#fff);transition:border-color var(--dur,.2s) var(--ease,ease),background-color var(--dur,.2s) var(--ease,ease)}
.ux-like svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round}
.ux-like-n::after{content:"128"}
.ux-like input:checked~.ux-like-n::after{content:"129"}
.ux-like input:checked+.ux-like-b{border-color:var(--accent,#cc4a26);background:color-mix(in srgb,var(--accent,#cc4a26) 12%,transparent)}
.ux-like input:checked+.ux-like-b svg{fill:var(--accent,#cc4a26);stroke:var(--accent,#cc4a26);animation:ux-pop var(--dur,.35s) var(--ease,ease)}
.ux-like input:focus-visible+.ux-like-b{outline:2px solid var(--accent,#cc4a26);outline-offset:2px}
@keyframes ux-pop{0%{transform:scale(1)}40%{transform:scale(1.3)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.ux-like input:checked+.ux-like-b svg{animation:none}}
</style>

<label class="ux-like"><input type="checkbox" aria-label="Like"><span class="ux-like-b"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"/></svg></span><span class="ux-like-n"></span></label>

When to use it

Use this for an action someone triggers directly — submitting, confirming, or moving to the next step. Keep the label a short verb so the intent is obvious.

Accessibility

Check that it reaches every state with the keyboard alone before you ship it, and keep the focus ring instead of removing it for looks. It has no JavaScript dependency, so it keeps working if a script fails to load, and it is built on native form controls or semantics rather than divs pretending to be one. Colors are read from CSS custom properties, so they follow your light or dark theme and you can raise contrast globally without touching this component.