Edit
Animated edit icon
Edit is a 2 s micro animation from the action set that plays on hover and reverses on mouse leave, like Edit 2 and Edit 3. Its static SVGs cover the edit-2 and edit states, so the resting icon still shows which one is active.
Free under the MIT license · Markdown version · About the files
Use it
npm install react-useanimationsimport UseAnimations from 'react-useanimations';
import edit from 'react-useanimations/lib/edit';
<UseAnimations animation={edit} size={32} />npx shadcn@latest add https://useanimations.com/r/edit.jsonimport { AnimatedEdit } from '@/components/animations/edit';
<AnimatedEdit size={24} /><div id="edit-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('edit-icon');
const a = lottie.loadAnimation({ container: el, renderer: 'svg', loop: false, autoplay: false, path: 'https://useanimations.com/icons/edit.json' });
el.addEventListener('mouseenter', () => { a.setDirection(1); a.play(); });
el.addEventListener('mouseleave', () => { a.setDirection(-1); a.play(); });
</script>Edit runs on the light build, lottie_light.min.js.
import LottieView from 'lottie-react-native';
<LottieView source={{ uri: 'https://useanimations.com/icons/edit.json' }} autoPlay loop={false} style={{ width: 48, height: 48 }} />import Lottie
LottieView {
await LottieAnimation.loadedFrom(url: URL(string: "https://useanimations.com/icons/edit.json")!)
}
.playing(loopMode: .playOnce)
.frame(width: 48, height: 48)val composition by rememberLottieComposition(LottieCompositionSpec.Url("https://useanimations.com/icons/edit.json"))
LottieAnimation(composition, iterations = 1, modifier = Modifier.size(48.dp))import 'package:lottie/lottie.dart';
Lottie.network('https://useanimations.com/icons/edit.json', width: 48, height: 48, repeat: false)Bundle edit.json with the app to use it offline.
<img src="https://useanimations.com/icons/edit/edit-2.svg" alt="Edit" width="24" height="24" />
<img src="https://useanimations.com/icons/edit/edit.svg" alt="Edit" width="24" height="24" />Inside <img> the SVG draws black; inline it to follow the text color.
Static SVG
Other versions
Questions about the Edit icon
›Does Edit finish its animation after mouse leave?
It reverses from the frame it reached back to the start, so a quick pass of the pointer gives a short nudge rather than the full 2 s. Keyboard focus plays it as well; a tap on a touch screen does not.
›Is Edit decorative?
By default it is aria-hidden. Pass aria-label="Edit" to announce it as an image, or leave it hidden when the link or button it sits in has its own text.
›Can Edit play on click instead?
Yes: pass interaction="click-replay". It then replays once from the start on every click unless reduced motion is preferred.