
Eye-catching pictures and movies are a good way to impress on-line guests. Nonetheless, almost each web site makes use of them to reinforce the person expertise (UX). Subsequently, including these normal visuals to your pages is now not sufficient to make your website stand out from the group.
Fortuitously, you’ll be able to add Lottie animations to your website to offer you a aggressive edge. LottieFiles offers a free library of animations you’ll be able to simply add to your web site. Then, you should use them to spice up person engagement and improve your website’s design.
On this publish, we’ll take a better take a look at some key advantages of utilizing Lottie animations in your website. Then, we’ll present you three easy methods so as to add these visible parts. Let’s get began!
The Advantages of Including Lottie Animations to Your Web site
Whereas movies and pictures could make your web site extra participating, these sorts of visuals are seen all around the web. Then again, animations may give you a singular edge.
Plus, the expected global market for the animation industry is anticipated to rise by 60% over the subsequent 9 years. Which means if you happen to begin utilizing them now, you may get forward of a rising pattern.
In reality, 61% of entrepreneurs used interactive content material as a digital engagement tactic final 12 months. Different methods included GIFs, which will also be used to show animations.
Lottie animations are a superb selection, largely on account of their small file sizes:
In reality, these recordsdata are 600% smaller than GIFs – You’ll be able to add them to your website with out weighing something down. This could will let you protect a constructive UX.
Higher but, Lottie animations could be utterly custom-made to fit your model identification. On prime of that, it’s an reasonably priced answer since LottieFiles offers probably the most intensive, free animation library. You’ll get entry to 1000’s of UI parts, characters, and illustrations.
Get Content material Delivered Straight to Your Inbox
Subscribe to our weblog and obtain nice content material similar to this delivered straight to your inbox.
How you can Add Lottie Animations to Your Web site (3 Methods)
Now that the advantages of utilizing Lottie animations, let’s take a look at 3 ways so as to add them to your website.
Technique 1: Add Your Animation with oEmbed
Including your Lottie animations via oEmbed is the only methodology on this information. The one draw back is that you just received’t be capable of edit the animation settings or set them as much as react to person interactions.
To get began with this methodology, browse the LottieFiles animations library to seek out the proper animation to your website. When you discover a design that you just like, click on on the animation and easily copy the oEmbed URL (you will have to be logged right into a free account to do that):
Then, head to WordPress and open the web page or publish the place you wish to embrace your animation. Subsequent, merely add a brand new Embed Gutenberg block:
Now, paste the oEmbed URL that you just copied from the Lottie web site:
Hit the Embed button to substantiate the motion.
At this level, it’s best to see the animation seem in your web page:
As we talked about earlier, you received’t be capable of customise the animation when you’ve added it to your WordPress web page or publish. Subsequently, it’s essential you make all of the edits you need beforehand whilst you’re nonetheless on the Lottie web site.
Technique 2: Add Your Animation Utilizing the Lottie block for Gutenberg Plugin
Whereas the oEmbed methodology is the only, utilizing the Lottie block for Gutenberg plugin can be very straightforward. Plus, it lets you instantly preview any adjustments you make to your designs.
First off, go to Plugins > Add New to put in and activate the Lottie block for Gutenberg plugin in WordPress:
You’ll be able to then log into your LottieFiles account or create an account without cost.
Subsequent, add a brand new block within the Gutenberg editor. Seek for the Lottie block and add it to your web page:
Right here, you’ll discover 3 ways to insert a Lottie animation in WordPress:
- Click on on Uncover animation to browse the LottieFiles library (you’ll want an account to do that).
- Choose Media Library to seek out an animation you’ve beforehand uploaded.
- Hit Insert from url to stick a JSON hyperlink.
In case you select the ultimate methodology, you could find the JSON hyperlink on the Lottie web site:
When you’ve added the animation to your web page, you’ll be able to preview the design in Gutenberg:
Now, within the Block settings, you’ll be able to customise your animation. For example, you may give it a clear background, change the size, or set off the animation with completely different actions. You too can use the plugin to add a Lottie animation as a WordPress background.
Technique 3: Add Your Animation with HTML and JavaScript
Including your Lottie animation with HTML and JavaScript remains to be pretty straightforward, however it’s probably the most complicated methodology. Plus, you aren’t capable of see updates in real-time.
As an alternative, you need to change between Gutenberg and your web site to preview your adjustments. Nonetheless, it’s possible you’ll wish to use this methodology if you happen to’re aware of HTML and on the lookout for enhanced customization choices.
To get began with this strategy, click on on the animation within the LottieFiles library and replica the Lottie JSON file hyperlink:
Subsequent, scroll down till you see “Use animation in…” and choose <html>:
It will take you to the LottieFiles Internet Participant:
Right here, you’ll be able to select a background coloration, decide the animation’s measurement and pace, and extra.
Now, deselect the Controls checkbox and also you’ll see that some HTML code has been generated on the backside of the display:
Copy the road of code that begins with “<lottie-player>” and ends with “</lottie-player>”. Then, in WordPress, add a brand new Customized HTML block:
Paste the HTML that you just copied from LottieFiles and click on on Save Draft within the prime right-hand nook:
Your animation received’t work simply but. First, you’ll have to load the Lottie Participant JavaScript file in WordPress.
To do that, return to the LottieFiles Internet Participant and replica the script tag that begins with “<script>” and ends with “</script>”:
Now, head to WordPress and set up the Simple Custom CSS and JS plugin:
As soon as energetic, go to the plugin’s dashboard and select Add HTML Code:
You may give your code a title like “Provides Lottie Participant”. Then, paste the script tag within the editor and click on on Publish:
Now, return to the web page the place you inserted your HTML code. You must see your Lottie animation whenever you change to the preview:
If the animation is just too huge or too small, you’ll be able to change the default parameters within the HTML code the place it says type= “width: X; top: X;”.
Add Lottie Animations to Your Web site Right now
Since pictures and movies seem on nearly each web site, together with them in your pages isn’t prone to make your designs stand out. Nonetheless, you’ll be able to add Lottie animations to your website to impress guests, replicate your branding, and enhance engagement.
To recap, listed below are 3 ways so as to add Lottie animations to your website:
- Add Lottie animations with oEmbed.
- Add Lottie animations utilizing the Lottie block for Gutenberg plugin.
- Add Lottie animations with HTML and JavaScript.
One other strategy to set your web site aside from the remaining is by designing customized pages which are distinctive to your model. At DreamHost, we will construct you a website that’s one-of-a-kind, mobile-friendly, and optimized for serps. Take a look at our internet design plans right now!
Get a Lovely Web site You’re Proud Of
Our designers will create a beautiful web site from scratch to completely match your model.