---
title: "Pencil animated icon"
description: "Pencil animated icon (Education). Light: the pencil writes a wave line, its tip riding the ink as it grows. Strong: the pencil lifts and drops onto the page, writes in 0.3 s and flicks up at the end. The line is retained; preview reset rearms."
canonical: https://generativeicons.com/icons/pencil/
---

# Pencil animated icon

Light: the pencil writes a wave line, its tip riding the ink as it grows. Strong: the pencil lifts and drops onto the page, writes in 0.3 s and flicks up at the end. The line is retained; preview reset rearms.

- Id: `pencil`
- Category: Education
- Search terms: write, writing, draw, drawing, sketch, handwriting, scribble, draft, doodle, stationery, graphite
- Two states: prepared to result, played forward and back
- 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/pencil.lottie (dotLottie, 27744 bytes, sha256 ca82523ecc2b60308cec7c6863420b37519ed0a481c9a0601999239f67b5104e)
- License: MIT

## Install

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

## React

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

export function PencilIcon() {
  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/pencil.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/pencil/ · https://generativeicons.com/api/icons/pencil
