How to Use Animations in Websites and Apps to Improve UX

Learn how to use animations effectively to enhance user experience (UX) while avoiding distractions, annoyances, or harm.

via Unsplash

Hey there!

Do you want to know how to make your website or app more engaging and delightful? Animations can be a powerful tool to enhance the user experience (UX) of your website or app user experience (UX) they can make your interface more engaging, intuitive, and delightful. But, there's a catch! You need to use them correctly, or they can become annoying, distracting, or even harmful to some users.

So, let's talk about how to use animations meaningfully and responsibly to improve UX.

What Are Animations and Why Use Them?

First of all, animations are visual effects that create the illusion of motion, transformation, or interaction. They can be simple or complex, subtle or flashy, and serve various purposes, such as:

Providing feedback: Animations can indicate that an action has been performed, such as clicking a button, submitting a form, or loading a page. They can also show the progress of a task, such as downloading a file, uploading an image, or searching for results. Feedback animations help users understand what is happening and reduce their anxiety, frustration, or confusion.

When we press the like button on Twitter, it provides a subtle animation as feedback that our response has been registered.

Heart animation on Twitter

Guiding attention: Animations can direct users' focus to specific elements, such as a call-to-action (CTA), a menu, or a notification. They can also highlight changes or differences, such as a new message, a discount, or a warning. Attention animations help users notice what is essential and avoid missing critical information.

Enhancing aesthetics: Animations can add personality, style, or emotion to your design, such as a logo, a mascot, or a background. They can also create a sense of realism, depth, or playfulness, such as a parallax effect, a hover effect, or a game-like interaction. Aesthetic animations help users enjoy the visual appeal of your interface and create a positive impression of your brand.

Rating experience animation by Darin Senneff

User engagement: Animations can be used to create a more engaging user experience. For example, when a user hovers over an element on the page, an animation can be used to provide a visual cue that the element is interactive.

Storytelling: Animations can tell a story or convey a message. For example, a sequence of animations can be used to guide the user through a process or explain a concept.

User login experience by Darin Senneff

How to Use Animations Responsibly

To use animations responsibly, you need to consider the following guidelines:

Accessibility- is essential, and every animation should be accessible to all users, regardless of their abilities or preferences. You should provide alternatives or fallbacks for users who cannot see or hear the animation, or who find it distracting or overwhelming. You should also avoid animations that trigger seizures or migraines, or that require fine motor skills or spatial orientation. For example, if you want to show a video, you should provide captions or transcripts for users who are deaf or hard of hearing, or who prefer to read the content. You should also provide a pause button, a volume control, and a full-screen option for users who want to control the playback. Salesforce provides useful tips for its lightning design system on how to use animation in its products.

Excerpt from Lightning Design System

Performance- Performance is crucial, and every animation should be optimized for performance to not slow down your website or app or consume too much battery or data. You should use modern web technologies, such as CSS animations, SVG animations, or Web Animations API, that leverage hardware acceleration and minimize the use of JavaScript or plugins. You should also test your animations on different devices and networks, and monitor their impact on your website or app's speed and stability. For example, if you want to show a background animation, you should use a lightweight format, such as a GIF or a video loop, that does not require continuous rendering or streaming. You should also compress the file size and reduce the frame rate so that it loads quickly and does not drain the user's battery or data. If you want to show a complex animation, such as a 3D model or a physics simulation, you should use a dedicated library or framework, such as Three.js or Matter.js, that optimizes the performance and memory usage of the animation.

SVG animated icon

User Control- Every animation should be under the user's control so that they can pause, resume, or disable the animation, or adjust its speed or volume. You should provide clear and easy-to-use controls for users who want to customize their experience or have preferences or disabilities that affect their perception or interaction. You should also respect the user's choice and save their preferences across sessions or devices. For example, if you want to show a slideshow, you should provide navigation buttons or indicators that allow the user to skip or replay the slides, or to adjust the interval or the transition effect. You should also provide a pause button or a keyboard shortcut that allows the user to stop the slideshow, or focus on a specific slide. If you want to show a sound effect, you should provide a mute button or a volume control that allows the user to adjust the volume or turn off the sound completely. You should also save the user's preference and apply it consistently across your website or app. For e.g. Duolingo provides an option in its settings to turn off the animations in the app.

Settings screen in the Duolingo app


Animations can be a powerful and delightful way to improve the user experience of your website or app, but they can also be distracting and harmful way if used excessively or inappropriately. To use animations meaningfully and responsibly, you need to consider their purpose, timing, and consistency, as well as their accessibility, performance, and user control. By following these principles and guidelines, you can create animations that enhance your interface, engage your users, and create a positive and memorable impression of your brand.

A humorous take on animation:

Tweet by Daryl Ginn



P.S. I am working on the guide on how to use animations responsibly and you will be the first to know it when it’s released.

References used for writing this post-

Join the conversation

or to participate.