# Thumb up animated icon

> MIT-licensed Thumb up animated icon: toggles between two states on click. Use it in React or shadcn/ui, or get the Lottie JSON or SVG.

Use the Thumb up icon for like, favourite and bookmark buttons on cards: it toggles between two states on click and takes 0.73 s. Click-to-toggle icons typically drive mute/unmute, show/hide password, menu/close, play/pause and like buttons. Also known as like, upvote and approve.

## Facts

- Interaction: [Click toggle](https://useanimations.com/interactions/click-toggle). Toggles between two states on click, or switches immediately when reduced motion is preferred.
- Category: [Action](https://useanimations.com/categories/action)
- Duration: 0.73 s at 30 fps
- Artboard: 32 × 32 px
- Lottie size: 6.7 kB
- License: MIT, attribution optional ([Licencing & Terms](https://useanimations.com/licencing-and-terms))

## Files

- Lottie JSON: https://useanimations.com/icons/thumb-up.json
- Static SVG (thumb-up): https://useanimations.com/icons/thumb-up/thumb-up.svg
- ZIP (Lottie JSON and SVGs): https://useanimations.com/icons/thumb-up.zip
- shadcn registry item: https://useanimations.com/r/thumb-up.json
- Web page: https://useanimations.com/icons/thumb-up

## React

```bash
npm install react-useanimations
```

```jsx
import UseAnimations from 'react-useanimations';
import thumbUp from 'react-useanimations/lib/thumbUp';

<UseAnimations animation={thumbUp} size={32} />
```

## shadcn/ui

```bash
npx shadcn@latest add https://useanimations.com/r/thumb-up.json
```

```tsx
import { AnimatedThumbUp } from '@/components/animations/thumb-up';

<AnimatedThumbUp size={24} />
```

## HTML and lottie-web

```html
<div id="thumb-up-icon" style="width: 48px; height: 48px"></div>

<script src="https://cdn.jsdelivr.net/npm/lottie-web@5.13.0/build/player/lottie_light.min.js"></script>
<script>
  const el = document.getElementById('thumb-up-icon');
  const a = lottie.loadAnimation({ container: el, renderer: 'svg', loop: false, autoplay: false, path: 'https://useanimations.com/icons/thumb-up.json' });
  const motion = matchMedia('(prefers-reduced-motion: reduce)');
  let isOn = true; // Frame 0 is on; the final frame is off.
  el.addEventListener('click', () => { isOn = !isOn; if (motion.matches) a.goToAndStop(isOn ? 0 : a.totalFrames - 1, true); else { a.setDirection(isOn ? -1 : 1); a.play(); } });
</script>
```

## FAQ

### Can Thumb up be a controlled toggle?

Make it controlled: pass active and flip it in onClick, e.g. active={on} onClick={() => setOn(!on)}. true plays to the last frame and false back to the first; an icon that mounts with active already true starts there without animating, and with reduced motion it jumps instead of playing.

### Should the Thumb up icon be a <button>?

Put its events on a real button with the render prop: render={(events, icon) => <button aria-label="Thumb up" aria-pressed={on} {...events}><span {...icon} /></button>}. The animation itself stays aria-hidden, and aria-pressed tells screen readers which state is on.

### Can I color the fill of Thumb up separately?

Yes: strokeColor sets the outlines and fillColor the filled parts, e.g. strokeColor="#e5484d" fillColor="#ffd1d1"; both follow the text color by default.

## Related icons

- [Heart](https://useanimations.com/icons/heart) (click-toggle)
- [Heart V2](https://useanimations.com/icons/heart-v2) (click-replay)
- [Arrow up circle](https://useanimations.com/icons/arrow-up-circle) (click-replay)
- [Arrow Up Left](https://useanimations.com/icons/arrow-up-left) (hover-replay)
- [Arrow Up Right](https://useanimations.com/icons/arrow-up-right) (hover-replay)
- [Chevron Up](https://useanimations.com/icons/chevron-up) (hover-replay)
- [Chevrons Up](https://useanimations.com/icons/chevrons-up) (hover-replay)
- [Corner Left Up](https://useanimations.com/icons/corner-left-up) (hover-replay)
- [Corner Right Up](https://useanimations.com/icons/corner-right-up) (hover-replay)
- [Corner Up Left](https://useanimations.com/icons/corner-up-left) (hover-replay)
- [Corner Up Right](https://useanimations.com/icons/corner-up-right) (hover-replay)
- [Trending Up](https://useanimations.com/icons/trending-up) (hover-replay)

[All action icons](https://useanimations.com/categories/action) · [All icons](https://useanimations.com/icons)
