31

Lottie animations as a web component

over 2 years ago from , Principal Engineer at Split Infinities

Heya! Today I made something I think people here may enjoy - a web component for rendering Lottie animations. It's supposed to feel like writing the html tag.

<lottie-animation src="https://raw.githubusercontent.com/splitinfinities/lottie-wc/master/src/assets/lottie_logo.json" autoplay loop controls></lottie-animation> <script src='https://unpkg.com/lottie-wc/dist/lottie.js'></script>

Image title

Make an index.html page, paste that into it and boom! You got simple, performant animations.

Thanks to AirBnb and Ionic's Stencil!

9 comments