---
title: "Underline animated icon"
description: "Underline animated icon (Text & document editing). Add or remove an underline: a rule is drawn beneath the U; reverse retracts it."
canonical: https://generativeicons.com/icons/underline/
---

# Underline animated icon

Add or remove an underline: a rule is drawn beneath the U; reverse retracts it.

- Id: `underline`
- Category: Text & document editing
- Search terms: underscore, underlined, underlined text, line under, text decoration, ctrl u, emphasize
- Two states: plain to underlined, 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/underline.lottie (dotLottie, 6581 bytes, sha256 33d30b56b2f0dad1c27964e541c72dee38fc0a62dba0a51f3aca96082b75ceb6)
- License: MIT

## Install

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

## React

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

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