# Like Button Animation: Instant, Satisfying and Reversible

> A like button should respond the instant it is tapped, with a short pop or burst that makes the action feel satisfying, and update the count optimistically before the server confirms. Make un-liking quieter than liking, roll back clearly if the request fails, and expose the state as a toggle button so assistive technology knows whether it is pressed.

Updated November 2026. Source: https://www.exodeui.com/learn/like-button-animation/

## Key takeaways

- Respond instantly and update optimistically
- Squash, pop with overshoot, optional burst, ticking count
- Make unlike quieter than like
- Use aria-pressed and roll back on failure

## Instant and optimistic

Liking is low-risk and frequent, so do not wait for the server. Change the icon and count immediately, send the request in the background, and roll back if it fails. This "optimistic update" approach is what makes social apps feel fast.

## Anatomy of a good like animation

Most well-known like animations combine a few small parts, all within roughly half a second:

- A quick squash or scale-down on press
- A pop back with slight overshoot as it fills
- Optional particles or a burst for extra delight
- A count that ticks up rather than jumping

## Unlike is quieter

Removing a like should be fast and calm: the heart empties without fireworks. Asymmetric feedback reflects that one action is a celebration and the other is a correction.

## Accessibility and failure

Use a real button with aria-pressed (or the platform's toggle equivalent) and a label like "Like". If the network request fails, revert the state and show a small message. Under reduced motion, keep the colour change and drop the burst.

## Building this in ExodeUI

In ExodeUI, which we make, the like button is a component with liked and not-liked states and spring physics for the pop. Your code sets the state optimistically and reverts it if the request fails; our jelly button is a good starting point.

## Frequently asked questions

### How long should a like animation be?

Around a few hundred milliseconds, starting instantly on tap.

### What is an optimistic update?

Showing the result of an action immediately, before the server confirms, and reverting if it fails.

### How do I make a like button accessible?

Use a button with aria-pressed reflecting the state, and a clear label.

### Should the like count animate?

A quick tick up helps people notice the change. Keep it short.

## Related

- [Button press animation](https://www.exodeui.com/learn/button-press-animation/)
- [Number counter animation](https://www.exodeui.com/learn/number-counter-animation/)
- [Jelly-like button](https://www.exodeui.com/components/jelly-like-button/)
- [Micro-interactions guide](https://www.exodeui.com/learn/micro-interactions/)
