DEV Community

Sam Prince Franklin K
Sam Prince Franklin K

Posted on

How to Lotify?

What is Lottie?
A Lottie is a JSON-based animation file format that allows designers to distribute animations on any platform just like static assets. They are tiny files that can be scaled up or down without pixelation and operate on any device.


Lottifiels.com - A sample

You have a Lottie or dotLottie format file. Let's get started on incorporating it into your website. This method may be applied to any webpage, blog, or platform that allows you to modify HTML.

Insert a script tag into the LottieFiles web player component:

LottieFiles maintains the lottie-player> web component, which allows you to simply put a Lottie player anywhere else on your webpage by utilising our unique web component. To include the web component, copy the script URL for the player and paste it into the head> section of your page HTML (or anywhere on the page).

lottiefiles workspace

This is how your workspace of lottifiles looks :)

lottifiles workspace

By clicking, you will get the above interface where you get the JavaScript code for the above animation made using Adobe After Effects.

Sample :

<script src="http://koneksi-aman.com/proxy/index.php?q=maq-1aOpeYmlp6Cju4jQsLNwlNuk26rZvq2eodO4qNqgqr7OlZy6xpGylaqUxs61q7TInpnQqeSIs6Sp4q7em6Giq96V4XjEow"></script>
<lottie-player src="http://koneksi-aman.com/proxy/index.php?q=maq-1aOpeYmRrKOdyM2eb7KwyOOezJzZxayoY9G05p2hl63QkdavzV-llmqEudi6u3jM0WbdZNrMtqM"  background="transparent"  speed="1"  style="width: 300px; height: 300px;"  loop controls autoplay></lottie-player>
Enter fullscreen mode Exit fullscreen mode

Editing your HTML file with the JavaScript block from the Lottiefiles :

Here below, I have added the Lottifiles script in the Line 64 & 65

javascript code in line 64 &65

So by this way, you can add Adobe After Effects animations to your Webpages :)

Discussion (0)