Hello,
We need to insert the code of a Lottie animation on our site.
I have the json file exported from After effects. What are the steps to place within the Code widget?
in the head section you have to insert the lottie.js:
`<script src="https://****/lottie.min.js"></script>`
and in the customcode-widget:
<div id="lottiecontainer"></div>
<script>
var animation = bodymovin.loadAnimation({
container: document.getElementById('lottiecontainer'),
path: 'https://*****/data.json',
renderer: 'svg',
loop: true,
autoplay: true,
name: "Animation",
});
</script>
you have replace the β*****β with your specific url:
3 Likes
I really think we should suggest this as a feature! I see many platforms touting this as a feature when itβs really just exporting the lottie code into a short bit of JS!
Would be as simple as uploading a file similar to the new shots feature.
1 Like