---
title: "Line tool animated icon"
description: "Line tool animated icon (Drawing & design tools). Light: a line is pulled from the start anchor to the end anchor in 0.52 s and the end anchor fades in. Strong: the start anchor is pressed, the line shoots across in 0.18 s and the end anchor pops in oversized and settles. The line is retained; preview reset rearms."
canonical: https://generativeicons.com/icons/line-tool/
---

# Line tool animated icon

Light: a line is pulled from the start anchor to the end anchor in 0.52 s and the end anchor fades in. Strong: the start anchor is pressed, the line shoots across in 0.18 s and the end anchor pops in oversized and settles. The line is retained; preview reset rearms.

- Id: `line-tool`
- Category: Drawing & design tools
- Search terms: straight line, draw line, line segment, segment, connect points, vector line, straight stroke, path segment
- 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/line-tool.lottie (dotLottie, 8322 bytes, sha256 d2d7bc11dc62c10a310d1c5dee02ea5b7346ef3c445ce155605138606d6b0137)
- License: MIT

## Install

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

## React

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

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