# Align Center animated icon

> Free Align Center animated icon that replays on every click. MIT-licensed for React, shadcn/ui, Lottie JSON and SVG.

Align Center is a 1.33 s micro animation that replays on every click; use it for text alignment controls in design tools. Click icons typically confirm send, save, refresh, download, add-to-cart and formatting buttons.

## Facts

- Interaction: [Click replay](https://useanimations.com/interactions/click-replay). Replays once from the start on every click unless reduced motion is preferred.
- Category: [Text editing](https://useanimations.com/categories/text-editing)
- Duration: 1.33 s at 30 fps
- Artboard: 32 × 32 px
- Lottie size: 4.3 kB
- License: MIT, attribution optional ([Licencing & Terms](https://useanimations.com/licencing-and-terms))

## Files

- Lottie JSON: https://useanimations.com/icons/align-center.json
- Static SVG (align-center): https://useanimations.com/icons/align-center/align-center.svg
- ZIP (Lottie JSON and SVGs): https://useanimations.com/icons/align-center.zip
- shadcn registry item: https://useanimations.com/r/align-center.json
- Web page: https://useanimations.com/icons/align-center

## React

```bash
npm install react-useanimations
```

```jsx
import UseAnimations from 'react-useanimations';
import alignCenter from 'react-useanimations/lib/alignCenter';

<UseAnimations animation={alignCenter} size={32} />
```

## shadcn/ui

```bash
npx shadcn@latest add https://useanimations.com/r/align-center.json
```

```tsx
import { AnimatedAlignCenter } from '@/components/animations/align-center';

<AnimatedAlignCenter size={24} />
```

## HTML and lottie-web

```html
<div id="align-center-icon" style="width: 48px; height: 48px"></div>

<script src="https://cdn.jsdelivr.net/npm/lottie-web@5.13.0/build/player/lottie_light.min.js"></script>
<script>
  const el = document.getElementById('align-center-icon');
  const a = lottie.loadAnimation({ container: el, renderer: 'svg', loop: false, autoplay: false, path: 'https://useanimations.com/icons/align-center.json' });
  const motion = matchMedia('(prefers-reduced-motion: reduce)');
  el.addEventListener('click', () => { if (!motion.matches) a.playSegments([0, a.totalFrames], true); });
</script>
```

## FAQ

### What happens if Align Center is clicked again before it finishes?

No queue: every click restarts the 1.33 s run from the first frame. With reduced motion preferred, clicks still reach your onClick but the icon stays still.

### How do I make Align Center an accessible button?

Put its events on a real button with the render prop: render={(events, icon) => <button aria-label="Align Center" {...events}><span {...icon} /></button>}. The animation itself stays aria-hidden.

### Can Align Center play on hover instead?

Yes: pass interaction="hover-replay". It then plays once on mouseenter unless reduced motion is preferred. Leaving does not stop it; entering during playback does not restart it.

## Related icons

- [Align Justify](https://useanimations.com/icons/align-justify) (click-replay)
- [Align Left](https://useanimations.com/icons/align-left) (click-replay)
- [Align Right](https://useanimations.com/icons/align-right) (click-replay)
- [Type](https://useanimations.com/icons/type) (click-replay)
- [Bold](https://useanimations.com/icons/bold) (click-replay)
- [Italic](https://useanimations.com/icons/italic) (click-replay)
- [Underline](https://useanimations.com/icons/underline) (click-replay)
- [Hash](https://useanimations.com/icons/hash) (hover-replay)
- [List](https://useanimations.com/icons/list) (hover-replay)

[All text editing icons](https://useanimations.com/categories/text-editing) · [All icons](https://useanimations.com/icons)
