---
title: "Undo / redo animated icon"
description: "Undo / redo animated icon (Everyday controls). The whole undo arrow winds back a few degrees, then swings a half turn about the canvas centre so its head points forward: undo becomes redo. Reverse swings it back."
canonical: https://generativeicons.com/icons/undo-redo/
---

# Undo / redo animated icon

The whole undo arrow winds back a few degrees, then swings a half turn about the canvas centre so its head points forward: undo becomes redo. Reverse swings it back.

- Id: `undo-redo`
- Category: Everyday controls
- Search terms: revert, step back, step forward, ctrl z, cmd z, ctrl y, roll back, reverse action, undo last, curved arrow
- Two states: undo to redo, 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/undo-redo.lottie (dotLottie, 5890 bytes, sha256 0530e9c7158c26038ef9bfff45428ab261e1b2d181c7a66322a04f438da67037)
- License: MIT

## Install

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

## React

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

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