---
title: "Eraser animated icon"
description: "Eraser animated icon (Drawing & design tools). The eraser rubs the line out. Light: the eraser presses down onto the line with a stop, sweeps left 11 units in one pass while the line disappears under it, and lifts off at the far end, leaving the short line (v1's end state). Strong: it lifts first, slams down with a bounce, scrubs back and forth in three decaying strokes as it travels, and lifts off with a small hop. The erased length never grows back; the reverse slides it back while the line redraws."
canonical: https://generativeicons.com/icons/eraser/
---

# Eraser animated icon

The eraser rubs the line out. Light: the eraser presses down onto the line with a stop, sweeps left 11 units in one pass while the line disappears under it, and lifts off at the far end, leaving the short line (v1's end state). Strong: it lifts first, slams down with a bounce, scrubs back and forth in three decaying strokes as it travels, and lifts off with a small hop. The erased length never grows back; the reverse slides it back while the line redraws.

- Id: `eraser`
- Category: Drawing & design tools
- Search terms: rubber, rub out, wipe, wipe out, clear drawing, remove stroke, delete stroke, pencil eraser, correction, scrub out, clean canvas
- Two states: drawn to erased, 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/eraser.lottie (dotLottie, 6587 bytes, sha256 c90f7c9616ecf1bc0f2931c939d061ebd277a3c1de0f880cc6fc6b1e688c7dbc)
- License: MIT

## Install

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

## React

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

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