- Interaction
- Hover
- Category
- Social media
- Duration
- 1.00 s
- Frame rate
- 30 fps
- Artboard
- 32 × 32 px
- Lottie size
- 14.5 kB
YouTube V2
Animated youtube v2 icon
YouTube V2 is a 1 s micro animation from the social media set that plays on hover and reverses on mouse leave, like YouTube and Instagram. Hover icons typically mark navigation items, delete buttons, settings, zoom controls and social links.
Free under the MIT license · Markdown version · About the files
Use it
npm install react-useanimationsimport UseAnimations from 'react-useanimations';
import youtube2 from 'react-useanimations/lib/youtube2';
<UseAnimations animation={youtube2} size={32} />npx shadcn@latest add https://useanimations.com/r/youtube-v2.jsonimport { AnimatedYoutubeV2 } from '@/components/animations/youtube-v2';
<AnimatedYoutubeV2 size={24} /><div id="youtube-v2-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('youtube-v2-icon');
const a = lottie.loadAnimation({ container: el, renderer: 'svg', loop: false, autoplay: false, path: 'https://useanimations.com/icons/youtube-v2.json' });
el.addEventListener('mouseenter', () => { a.setDirection(1); a.play(); });
el.addEventListener('mouseleave', () => { a.setDirection(-1); a.play(); });
</script>YouTube V2 runs on the light build, lottie_light.min.js.
import LottieView from 'lottie-react-native';
<LottieView source={{ uri: 'https://useanimations.com/icons/youtube-v2.json' }} autoPlay loop={false} style={{ width: 48, height: 48 }} />import Lottie
LottieView {
await LottieAnimation.loadedFrom(url: URL(string: "https://useanimations.com/icons/youtube-v2.json")!)
}
.playing(loopMode: .playOnce)
.frame(width: 48, height: 48)val composition by rememberLottieComposition(LottieCompositionSpec.Url("https://useanimations.com/icons/youtube-v2.json"))
LottieAnimation(composition, iterations = 1, modifier = Modifier.size(48.dp))import 'package:lottie/lottie.dart';
Lottie.network('https://useanimations.com/icons/youtube-v2.json', width: 48, height: 48, repeat: false)Bundle youtube-v2.json with the app to use it offline.
<img src="https://useanimations.com/icons/youtube-v2/youtube-2.svg" alt="YouTube V2" width="24" height="24" />Inside <img> the SVG draws black; inline it to follow the text color.
Static SVG
Other versions
Questions about the YouTube V2 icon
›Does YouTube V2 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 1 s. Keyboard focus plays it as well; a tap on a touch screen does not.
›Is YouTube V2 decorative?
By default it is aria-hidden. Pass aria-label="YouTube V2" to announce it as an image, or leave it hidden when the link or button it sits in has its own text.
›Can I color the fill of YouTube V2 separately?
Yes: strokeColor sets the outlines and fillColor the filled parts, e.g. strokeColor="#e5484d" fillColor="#ffd1d1"; both follow the text color by default.