Web Animations

The technical tips for developing an engaging digital experience.

Web Design, Motion Design
3 min read

What is website animation?

Website animations are elements with motion that add dynamic effects to a website. They can range from simple transitions, like fading in and out, to complex interactions, like parallax scrolling or animated illustrations.

You can use web animations for practical and aesthetic purposes. For example:

  • Guiding users through a process, such as filling out a form or navigating to a certain page
  • Telling a story
  • Conveying progression through a task (e.g., with a progress bar)
  • Highlighting important info, like a call-to-action button
  • Creating an immersive and interactive experience to showcase a product or service
  • Adding a touch of personality and brand identity to the website's design

When used effectively, they bring your client's site to life and capture their customers' attention (without adding too much to the overall costs). However, when used poorly, animations can create a clunky, distracting user experience and cause the site to lag.

The importance of motion

For starters, people have short attention spans. In fact, it takes about 50 milliseconds for a user to form an opinion about your website before they decide to stay or leave. And they say not to judge a book by its cover... but ~94% of first impressions are design-related.

There are several benefits to adding animations to client websites:

  • Improve user engagement: Animations are attention-grabbing and interactive, making the site more enjoyable to use. They also prompt users to take specific actions, keeping them on the site longer.
  • Simplify complex messages: Around two-thirds of us are visual learners. With web animation, colors, graphics, text, colors, and audio come together to make pertinent information a lot more digestible in a much smaller space.
  • Dynamic Feedback: Users want to see their actions being acknowledge on the website, which is why many animations aim to provide a sense of feedback. Thats why feedback and micro-interaction for elements like buttons are often the main focus of animations, as it can drastically boost engagement and conversion rates.
  • Improve SEO performance: Among Google's 200+ ranking factors are dwell time and engagement rate. If users leave the site quickly, search engines will stop ranking it high. Animations and motion feedback are very good at increasing engagement time.
  • Drive higher conversion rates: The longer users are on the site (and the easier it is for them to interact with the site), the more chances you'll have to convert them.
  • Build a unique, recognizable brand: The animation techniques you use to highlight branding elements, product features, and benefits for your clients will reinforce their brand, create an emotional connection with users, and overall contribute to their products being top-of-mind when customers are ready to make a purchase decision.

Of course, there are potential drawbacks. If your animations are poorly timed, over-the-top, or too close to one another, they're more of a distraction than an asset. Too much movement can also slow down the web page and doesn't always translate well to mobile interfaces.

Common languages

CSS Animations

This is probably the simplest way for beginners to add animation to their website. CSS Animations use keyframes and properties like "transform" and "transition" to create movement or transition effects. They're lightweight, don't require JavaScript, and have good browser support.

JavaScript libraries

Libraries like GSAP, Three.js, and Motion, offer a more robust set of tools for creating complex animations with just a few lines of code. They're particularly useful for complex or interactive animations where CSS falls short, like adding interactive animations or 3D graphics.

JavaScript's real strength in animations comes into play with its ability to handle user interactions and events, though. You also have access to the DOM (Document Object Model) and the viewport for animations that are designed to provide more visual feedback.

They're also more processor-intensive than CSS animations, especially if you don't optimize them properly. It's important to use efficient code to minimize performance impacts.

SVG

SVG (Scalable Vector Graphics) animations involve manipulating SVG elements to create animations directly within the SVG structure. SVG is an XML-based format for describing two-dimensional graphics, and just like with HTML elements, you can use CSS to animate SVG properties. This includes transitions for simpler animations and keyframes for more complex sequences. Since SVG elements are part of the DOM, you can target and style them using CSS. You can animate properties like opacity, transform, and stroke using CSS.

The best thing about SVG animations is they don't require rasterization and can scale without losing quality. Still, keep accessibility in mind and remember that complex or excessive animations can still lead to performance issues on less powerful devices.

And more!

There's a lot of other tools that you can use to create animations of different types and interactivity. Honorable mentions include Lottie, Canvas, and WebGL.

Common animations

In web design, navigation refers to the system that allows users to move through different parts of a website.

Navigation animations involve animating the elements visitors use to move around a website, like menus, buttons, and links. These include clickable hover icons, drop-down menus, or animated transitions between pages.

These are the most important types of animation because they organize your client's site architecture. Make sure you use navigation animations that improves the user's experience, and not distract them.

Hero animations

A website's "hero" is the main content or image at the top of its web page. This is the first part of your website that visitors see, and its important to hook them in. Animating hero elements involves using motion graphics, videos, and slideshows to grab users' attention and make a strong first impression.

Hero animations could be:

  • Loading animations
  • Video headers
  • Animated illustrations
  • Hover effects
  • Background animations

Effective hero animations should enhance storytelling. They should feel purposeful without overwhelming and encourage user interaction without distracting from the content. Just be mindful of performance, especially for a larger structure of elements.

Attracting attention

You can boost web conversions simply by animating the elements you want site visitors to click on. This is typically a button or an entire call-to-action section.

Anywhere someone can...

  • Book a driving lesson
  • Contact your gardening business
  • Leave customer feedback
  • Start browsing your digital shop

It doesn't have to be complicated (actually, it shouldn't). A little glow, enlargement, or a subtle wiggle effect can entice users to take action.

Loading animation

Nobody likes waiting for something. But you know what's worse? Waiting for something and having no idea how long the wait will last. That's where loading animations come in.

They're subtle visual cues that tell users when a process is happening or how long they should wait. They usually appear in the form of a loading bar, percentage circle, or other visual indicators. Even if you can't provide a progress bar for loading times, you should still add a spinning loading icon or some sort of widget to let visitors know something is happening.

You could even add a fun fact, "hack" for using your product, or even a joke to make the wait more enjoyable.

Otherwise, people will become impatient and leave your website altogether.

Skeleton screens

A skeleton screen is a design pattern used as a placeholder to enhance the user experience during page load times. It displays a wireframe-like visual that mimics the final layout of the page, providing users with clues about the content that will appear.

This approach gives users a sense of progression, making them feel like they're getting closer to their goal as things load. Skeleton screens can be particularly effective in two scenarios:

  • Resource-intensive pages that require loading data from multiple sources or executing background scripts to display content
  • Image-heavy pages with lots of high-quality visuals that take time to load

However, it's essential to use skeleton screens judiciously. They are not a substitute for optimizing Core Web Vitals. If a page already loads quickly, adding a skeleton screen might not enhance the user experience.

Progression

A simple way to get users to keep interacting with the site is to show them how far they have to go. This improves engagement with other interactive elements like forms or questionnaires.

A few examples:

  • A progress bar on a checkout page
  • A percentage sign next to a survey question
  • A timeline illustrating the steps of a process

Progression animations allow visitors to pace themselves and track their accomplishments. And they help them commit to long-form content, which they might abandon if no end is in sight.

Visual feedback

Visual feedback is one of the most important types of website animation because it tells your viewers what they've done (or haven't done).

As users interact with different elements of the website, it shows them what they're doing. For example:

  • Displaying a checkmark when a password meets the required parameters
  • Highlighting errors on a form
  • Displaying a blurb of information over an (i) symbol

The main purpose of visual feedback is to give users a visual confirmation that something has happened from their action. Plus, it can give real-time feedback as to what still needs to be done.

Micro-interactions

A micro-interaction is a tiny animation that responds to user action. For example, when you hover over a button, it might slightly change color or enlarge in size.

They're subtle but effective ways to help people navigate the website and understand how they should interact with different elements.

Although micro-interactions are small, they play an important role in guiding site visitors from one part of the journey to the next. They help people take action without thinking.

Scrolling animations

In web design, we categorize based on their execution and display methods. These include:

  • One-screen scroll animations, where effects occur within a single page section without actual page movement
  • Scroll-bound animations, which change elements' behaviors based on the scrolling speed and position
  • Scroll-triggered animations are initiated when a specific scroll position is reached, progressing independently of further scrolling.

For an interactive website, parallax scrolling is an excellent scrolling animation example. You can also use viewport and scroll effects to craft a sensationally engaging site.

Really, though, the possibilities are endless. 3D animations, zoom effects, and image filters are just a few of the many custom animations you can use to create unconventional movements when users scroll through the content on your page.

Welcoming and onboarding

Arguably some of the most important animations on this list, welcoming and onboarding animations engage users before they've even taken a single action. These specifically apply to SAAS websites that offer a digital service or software.

Welcome animations are shown as soon as a user enters the site and create a positive first impression. They normally take a similar format as modal animations and greet first-time visitors with a discount, CTA, or a message from the brand.

Onboarding animations help new customers familiarize themselves with the website features and services (e.g., a portal for tracking orders, a referral program, or a virtual tailoring tool). They can also guide users through registration or introduce new features and updates.

Technical tips

Start on mobile

The mobile version of a website has become, in some cases, the main breakpoint to optimize. Not only has mobile web traffic increased year over year, the potential for your website to rank high in Google Search results is largely dependent on your mobile site experience.

In addition, the mobile browser experience is more limited. The vertical, smaller screen requires an alternate approach for what is normally impactful on desktop, like a horizontal menu or a multi-layered scroll animation. Meanwhile some animations simply will not work on mobile, like the mouse hover effect that requires a cursor.

To create the optimal animation experience on mobile, use animations that:

  • Aren't compromised by a smaller, mobile screen
  • Don't require a cursor (consider viewport animations)
  • Don't make the mobile site heavy and slow

Purposeful animations

When animation is used simply for the shock and awe of it, you're more likely to distract and turn away visitors than to engage and convert them. Good animation serves as a guide for visitors, pointing out elements that they should engage with and taking them on the journey that you've designed and that supports your business objectives.

This last point is important to revisit as you design your site (and decide on your animations): what's the objective of your site? Do you want users to read your content? Then lead them through your narrative with animations that point them through your story, like signposts on a hiking trail. Want users to submit a form? Animations can point to the form, emphasize its borders and highlight the submit button.

Ask yourself these questions as you determine where, when and how to apply animations:

  • Which element(s) do I want to emphasize?
  • Are these animations helping or distracting from the desired visitor action?
  • Why is this the right animation effect to use for this action and this element?

Plan your animations

Plan your animations in your design process, before you begin building the website. Just like you decide the colors, tone of voice and typefaces that fit your brand, website animations should also be consistent with the brand's identity. Otherwise you risk creating a jarring, inconsistent site that doesn't reflect your client's business.

Watch the performance

One of the biggest killers of web traffic and conversions is slow-loading pages. The longer visitors need to wait to see the content on your page, the more likely they are to abandon the page and never return.

Because animations can be performance intensive, especially at a larger scale. it's important to keep an eye on what they're doing to your loading speeds. Find a balance between performance and motion.

Back to All Snippets