Day to night animated illustration

A waterfront city runs through a whole day: the sun sets, windows and lamps light up, stars and the moon come out, and dawn returns.

Preview on
Edit this in Mosso

Change anything, then export a GIF, an MP4 or a transparent video.

Try a look

Shown in a sample look. In Mosso it switches to your brand in one click.

Smooth motion. Confident and clear. Smooth moves with a gentle landing.

We read the colours and fonts from your home page. They stay in this browser.

The sample look, font and background are shared.

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 is set to loop. Check the loop and contrast after editing. The background is transparent, so it sits on top of any page, photo or video.

The colours come from your brand kit. Change the timing in the editor.

  • A looping background for a city or travel page
  • A hotel or restaurant post about day and night
  • A calm backdrop for a stream or a video call
  • Empty states and error pages
  • Onboarding screens

How to use it on a website

  1. Pick your brand above, then download the dotLottie file.
  2. Add it to your site's files, for example as /animations/day-to-night.lottie.
  3. 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.

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.

For the steps in Mosso, read Edit a template.

Use it in code

Download the file, then copy the code for your platform. It loops, and it holds a still frame for people who ask for less motion.

  1. Put day-to-night.lottie in your site's animations folder, so it loads from /animations/day-to-night.lottie.
  2. Paste this where it should play.
index.html
<script type="module" src="https://cdn.jsdelivr.net/npm/@lottiefiles/dotlottie-wc@0.10.0/dist/dotlottie-wc.js"></script>

<dotlottie-wc src="/animations/day-to-night.lottie" autoplay loop data-still="0.094"
  aria-hidden="true"
  style="display: block; width: 100%; aspect-ratio: 16 / 9"></dotlottie-wc>

<script>
  // People who ask for less motion see a still frame: data-still is how far in, from 0 to 1.
  if (matchMedia('(prefers-reduced-motion: reduce)').matches) {
    const players = document.querySelectorAll('dotlottie-wc');
    players.forEach((el) => el.removeAttribute('autoplay'));
    customElements.whenDefined('dotlottie-wc').then(() => players.forEach((el) => {
      const player = el.dotLottie;
      if (!player || !el.dataset.still) return;
      const show = () => player.setFrame(Math.round(Number(el.dataset.still) * (player.totalFrames - 1)));
      if (player.isLoaded) show();
      else player.addEventListener('load', show);
    }));
  }
</script>

Lottie in HTML: setup and common problems

Good to know

  • Give it room

    Illustrations need space around them. Put them next to a short line of text, not behind it.

  • Loop quietly

    A calm loop can stay on screen for a long time. Save big moves for one-off moments.

  • Load it late

    If the scene sits further down the page, start the player when it scrolls into view.

  • 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 day to night animation free?

Yes. A free account lets you download up to 50 library animations a day. You may edit these animations and use them in personal and commercial work, including client projects. Third party parts keep their own licences. Keep the supplied notices and credits when you share them. Mosso does not require a credit for its own work. The restriction on reselling Mosso templates does not limit rights granted by third party licences.

Can I change the colours?

Yes. Pick a sample look above to see how it changes. Open the Mosso project to edit its layers, timing and effect settings, and add your logo. Imported files may have fewer editable parts.

Should I download Lottie JSON or dotLottie?

dotLottie is the same animation in a zipped file, so it is smaller: this one is about 15 KB instead of 173 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 with a transparent background or PNG frames, all from the same project.

Can I change parts of the scene?

Open the Mosso project to edit its layers, timing and effect settings. Imported files may have fewer editable parts.

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.