---
title: "Text alignment animated icon"
description: "Text alignment animated icon (Text & document editing). Short lines slide from the left edge to the right edge; Strong pulls back first and lands with a checked overshoot."
canonical: https://generativeicons.com/icons/text-alignment/
---

# Text alignment animated icon

Short lines slide from the left edge to the right edge; Strong pulls back first and lands with a checked overshoot.

- Id: `text-alignment`
- Category: Text & document editing
- Search terms: align left, align right, align center, align centre, left align, right align, justify, justified, flush left, flush right
- Two states: left to right, 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/text-alignment.lottie (dotLottie, 7521 bytes, sha256 57af2452e7560c5aac0398b24090a9aeaff5daf0288fc3ea374d79d33c33fe91)
- License: MIT

## Install

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

## React

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

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