# Type animated icon

> Type animated icon with a click replay interaction for React and shadcn/ui. Download the Lottie JSON or SVG, free under MIT.

Type is a 1.2 s micro animation from the text editing set that replays on every click, like Italic and Underline. 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.20 s at 30 fps
- Artboard: 32 × 32 px
- Lottie size: 1.7 kB
- License: MIT, attribution optional ([Licencing & Terms](https://useanimations.com/licencing-and-terms))

## Files

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

## React

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

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

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

## shadcn/ui

```bash
npx shadcn@latest add https://useanimations.com/r/type.json
```

```tsx
import { AnimatedType } from '@/components/animations/type';

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

## HTML and lottie-web

```html
<div id="type-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('type-icon');
  const a = lottie.loadAnimation({ container: el, renderer: 'svg', loop: false, autoplay: false, path: 'https://useanimations.com/icons/type.json' });
  const motion = matchMedia('(prefers-reduced-motion: reduce)');
  el.addEventListener('click', () => { if (!motion.matches) a.playSegments([0, a.totalFrames], true); });
</script>
```

## FAQ

### Do fast clicks on Type queue up?

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

### Should the Type icon be a <button>?

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

### Can Type 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

- [Italic](https://useanimations.com/icons/italic) (click-replay)
- [Underline](https://useanimations.com/icons/underline) (click-replay)
- [Align Left](https://useanimations.com/icons/align-left) (click-replay)
- [Align Justify](https://useanimations.com/icons/align-justify) (click-replay)
- [Align Right](https://useanimations.com/icons/align-right) (click-replay)
- [Align Center](https://useanimations.com/icons/align-center) (click-replay)
- [Bold](https://useanimations.com/icons/bold) (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)
