---
title: "Pill animated icon"
description: "Pill animated icon (Health & Fitness). The capsule releases its dose. Light: the halves pull apart along the axis, a granule spills out of the gap on each side and fades, and the halves snap shut with a hit and a tiny click rebound. Strong: the capsule twists as it pulls further apart, two granules spill out of each side in turn, and it snaps shut, rebounds and untwists with a settle."
canonical: https://generativeicons.com/icons/pill/
---

# Pill animated icon

The capsule releases its dose. Light: the halves pull apart along the axis, a granule spills out of the gap on each side and fades, and the halves snap shut with a hit and a tiny click rebound. Strong: the capsule twists as it pulls further apart, two granules spill out of each side in turn, and it snaps shut, rebounds and untwists with a settle.

- Id: `pill`
- Category: Health & Fitness
- Search terms: capsule, medicine, medication, meds, drug, tablet, pharmacy, prescription, rx, dose, dosage, vitamin, supplement
- One action, back to rest
- Styles: outline, solid, duotone; outline weights 1.5, 2, 2.5 (any from 1 to 3); motion light or strong
- File: https://generativeicons.com/assets/pill.lottie (dotLottie, 4357 bytes, sha256 03edfb30f38e1e33c51ea3eaac5857f3eefb8cd46c8d5701d80537cbdec71402)
- License: MIT

## Install

```sh
npm install @lottiefiles/generative-icons-runtime
npx generative-icons init
npx generative-icons add pill
```

## React

```tsx
// npm install @lottiefiles/generative-icons-react
'use client';
import { AnimatedIcon } from '@lottiefiles/generative-icons-react';
import icon, { src } from './generative-icons/pill.mjs';

export function PillIcon() {
  return <AnimatedIcon icon={icon} src={src} size={32}
    color="#ffffff" variant="outline" weight={2}
    motion="light" theme="dark" />;
}
```

## JavaScript

```js
import { createIcon } from '@lottiefiles/generative-icons-runtime';
import icon, { src } from './generative-icons/pill.mjs';

const handle = await createIcon(canvas, {
  icon, src,
  color: '#ffffff', style: 'outline', weight: 2,
  motion: 'light', theme: 'dark'
});
button.addEventListener('click', () => handle.play());
// On removal: handle.destroy();
```

More: https://generativeicons.com/icons/pill/ · https://generativeicons.com/api/icons/pill
