Starry night animated background
Stars twinkle, a crescent moon glows and shooting stars cross a sky in your darkest tone.
Change anything, then export a GIF, an MP4 or a transparent video.
Free download
Free for your own projects and client work, including commercial use. Read the licence
What it's good for
It is 1920 × 1080 pixels and 8 seconds long, and it loops without a visible jump, so it can play for as long as you need. It comes with a background, which you can switch off above to get a transparent file.
The colours, fonts and timing come from the brand kit you pick. Each brand has its own motion style, so the same animation moves slower for a calm brand and quicker for a snappy one.
- Behind a website hero or a sign up section
- Slides and video backgrounds
- Video call and stream backgrounds, as video
How to use it on a website
- Pick your brand above, then download the dotLottie file.
- Add it to your site's files, for example as
/animations/starry-night-background.lottie. - Paste the code where the animation should play.
Without code
- Webflow: upload the Lottie JSON file in the Assets panel, then drag it onto your page.
- Framer: add a Lottie component and give it the JSON file.
- WordPress: use a Lottie block plugin and upload the JSON file.
- iOS and Android: add the file to your app and play it with the official Lottie library.
Need it as a GIF or a video? Download the Lottie JSON and use the free Lottie to GIF or Lottie to MP4 converter, or check any file in the Lottie viewer.
<script src="https://unpkg.com/@lottiefiles/dotlottie-wc/dist/dotlottie-wc.js" type="module"></script>
<dotlottie-wc src="/animations/starry-night-background.lottie" autoplay loop aria-hidden="true"
style="width: 100%; aspect-ratio: 16 / 9"></dotlottie-wc>
import { DotLottieReact } from '@lottiefiles/dotlottie-react';
export function StarryNightBackground() {
return (
<DotLottieReact
src="/animations/starry-night-background.lottie"
autoplay
loop
style={{ width: '100%', aspectRatio: '16 / 9' }}
/>
);
}
// npm install lottie-web
// In your HTML: <div id="starry-night-background" style="width: 100%; aspect-ratio: 16 / 9"></div>
import lottie from 'lottie-web';
lottie.loadAnimation({
container: document.getElementById('starry-night-background'),
renderer: 'svg',
loop: true,
autoplay: true,
path: '/animations/starry-night-background.json',
});
Good to know
Keep contrast low
Text has to stay readable on top. Use soft colours in the background and keep your strongest colour for the button.
Pause it off screen
Pause the animation when it scrolls out of view to save battery. Most Lottie players make this easy.
Fill the box
Set the player to cover its area, so no empty edges show on very wide or very narrow screens.
Respect reduced motion
Some people ask their device for less motion. Check prefers-reduced-motion and show a still frame for them instead.
Questions
Is this starry night animation free?
Yes. Download the Lottie JSON or dotLottie file above for free, with no account. You can use it in your own projects and in client work, including commercial work. You just can't resell it or give it away as a template or stock file.
Can I change the colours?
Yes. Pick a sample brand above to see how it changes. To use your own colours, fonts and logo, open it in Mosso, where every layer and keyframe is editable.
Should I download Lottie JSON or dotLottie?
dotLottie is the same animation in a zipped file, so it is smaller: this one is about 6.9 KB instead of 66 KB. Use it with the dotLottie players for the web, React, iOS and Android. Pick Lottie JSON when a tool asks for a .json file, like Webflow or lottie-web.
Can I get it as a GIF or a video?
Yes. Open it in Mosso and export a GIF, an MP4, a WebM video or PNG frames, all from the same project.
Will an animated background slow down my site?
A Lottie background is a small vector file, much lighter than a background video. Load it after the rest of your page and pause it when it is off screen.
Make it yours in Mosso
Change the words, colours, timing and size, add your logo, and export Lottie, GIF, MP4 or transparent video. Or start from a blank canvas and make something new.