# Filter animated icon

> MIT-licensed Filter animated icon: replays on every click. Use it in React or shadcn/ui, or get the Lottie JSON or SVG.

Filter is a 2 s micro animation from the action set that replays on every click, like Power and Plus Circle. Click icons typically confirm send, save, refresh, download, add-to-cart and formatting buttons. Also known as funnel and sort.

## Facts

- Interaction: [Click replay](https://useanimations.com/interactions/click-replay). Replays once from the start on every click unless reduced motion is preferred.
- Category: [Action](https://useanimations.com/categories/action)
- Duration: 2.00 s at 30 fps
- Artboard: 32 × 32 px
- Lottie size: 13.5 kB
- License: MIT, attribution optional ([Licencing & Terms](https://useanimations.com/licencing-and-terms))

## Files

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

## React

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

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

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

## shadcn/ui

```bash
npx shadcn@latest add https://useanimations.com/r/filter.json
```

```tsx
import { AnimatedFilter } from '@/components/animations/filter';

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

## HTML and lottie-web

```html
<div id="filter-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('filter-icon');
  const a = lottie.loadAnimation({ container: el, renderer: 'svg', loop: false, autoplay: false, path: 'https://useanimations.com/icons/filter.json' });
  const motion = matchMedia('(prefers-reduced-motion: reduce)');
  el.addEventListener('click', () => { if (!motion.matches) a.playSegments([0, a.totalFrames], true); });
</script>
```

## FAQ

### Do fast clicks on Filter queue up?

No queue: every click restarts the 2 s run from the first frame. With reduced motion preferred, clicks still reach your onClick but the icon stays still.

### Should the Filter icon be a <button>?

Put its events on a real button with the render prop: render={(events, icon) => <button aria-label="Filter" {...events}><span {...icon} /></button>}. The animation itself stays aria-hidden.

### Can I color the fill of Filter 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

- [Power](https://useanimations.com/icons/power) (click-replay)
- [Plus Circle](https://useanimations.com/icons/plus-circle) (click-replay)
- [Edit 2](https://useanimations.com/icons/edit-2) (click-replay)
- [Edit 3](https://useanimations.com/icons/edit-3) (click-replay)
- [Heart V2](https://useanimations.com/icons/heart-v2) (click-replay)
- [Download](https://useanimations.com/icons/download) (click-replay)
- [Check](https://useanimations.com/icons/check) (click-replay)
- [Refresh Ccw](https://useanimations.com/icons/refresh-ccw) (click-replay)
- [Chevron right](https://useanimations.com/icons/chevron-right) (click-replay)
- [Refresh](https://useanimations.com/icons/refresh) (click-replay)
- [Thumbs Down](https://useanimations.com/icons/thumbs-down) (click-replay)
- [Check Circle](https://useanimations.com/icons/check-circle) (click-replay)

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