Simplified Animations on the Web

This ad is not shown to multipass and full ticket holders
React Summit US
React Summit US 2026
November 17 - 20, 2026
New York, US & Online
Upcoming event
React Summit US 2026
React Summit US 2026
November 17 - 20, 2026. New York, US & Online
Bookmark
Rate this content
Sentry
Promoted
Code breaks, fix it faster

Crashes, slowdowns, regressions in prod. Seer by Sentry unifies traces, replays, errors, profiles to find root causes fast.

Get started

Animations on the web have always seemed like something impossible to do right. With complex JavaScript needed in order to do anything compelling and a lot of math required, animations are often ignored. But, what if there were a better way? What if you could just tell the browser what will animate and let the browser take care of the rest? Enter View Transitions.

View Transitions are a new web feature that allows developers to build compelling animation without having to dive into working JavaScript in order to do so. Let's look at adding View Transitions into our app and how to drive compelling animations with ease!

This talk has been presented at JSNation US 2024, check out the latest edition of this JavaScript Conference.

FAQ

MacroMedia Flash was a popular tool for web development that allowed designers to create animations using a timeline interface. It was significant because it brought advanced animation capabilities to the web, enabling designers and developers to create engaging and interactive content.

Internet Explorer was the first browser to support animations on the web. It introduced a meta tag that allowed defining Enter and Exit animations, providing built-in transitions for animating elements.

After Internet Explorer's animation capabilities became obsolete, keyframe animations were introduced around 2007, initially supported by Safari. These allowed developers to define start and end points for animations using CSS.

JavaScript plays a role in web animations by providing animation libraries like GreenSock and jQueryAnimate, which allow more complex animations. However, they often require a lot of JavaScript code, which can affect performance.

Web Animations are built into the browser and incorporate ideas from JavaScript animation libraries like GreenSock. They simplify animation code and improve performance by allowing animations to be managed directly by the browser.

The View Transitions API is a mechanism for creating animated transitions between different DOM states. It allows for easy updating of DOM contents with animations, providing a smoother user experience.

The View Transitions API is currently supported in Chrome, Edge, Arc, and Safari. Firefox is working on adding support.

View Transitions simplify animation development by allowing the browser to manage animations. Developers can define animations with CSS and the browser handles the transitions, reducing the need for complex JavaScript code.

Other animation features on the web include scroll-driven animations, animation compositions for managing multiple animations, and transition behaviors for states like display none to display block.

Mike Hartington
Mike Hartington
28 min
18 Nov, 2024

Comments

Sign in or register to post your comment.
Video Summary and Transcription
MacroMedia Flash revolutionized web development by allowing easy creation of animations. Web animations evolved from meta tags to keyframe animations and JavaScript animations. View transitions provide a better solution by creating animated transitions between DOM states. Advanced view transitions allow for tracking changes in the DOM and achieving powerful features like animating elements with display:none. The web animations approach uses the flip animation technique to reveal information. Astro is a project that embraces view transitions and offers built-in support. React has good support for view transitions. View transitions are currently supported in most major browsers. CSS animations and shape transitions can be easily integrated to customize animation behavior.

1. Flash and Web Animations

Short description:

MacroMedia Flash was the best thing to ever happen to web development. It allowed you to create animations easily with a timeline and bring in designer friends to make things look great. Animations on the web have a fun history, and the first browser to support animations was Internet Explorer. It shipped with a cool meta tag.

♪♪♪ I am getting old. Speaking of getting old, who remembers this? How's your knees and back feeling? Have you taken your Advil today? All seriousness, MacroMedia Flash, for those who did not know, was the best thing to ever happen to web development. I will die on that hill. I think it's great. Just like I will die on the hill of OneBase indexes.

MacroMedia Flash was great because not only could you bring in like your designer friends who knew how to make things look great, but they gave you this cool little thing up here at the top called a timeline. For those who didn't get a chance to experience Flash in all its glory, a timeline allowed you to take, say, a circle. Could just be an object, could be some text, could be anything. You could select the spot on the timeline where you want your object to like how long you want an animation to take. You would move your object to that timeline, move the object in space, select the timeline, and then say, create animation tween. And then when you hit play, it would just move. And you could do a lot of other things with this. Like you could warp it into a different shape completely. Flash was really cool in that case and we lost a lot of the good that Flash brought to the web. We're starting to get it back though. So we're going to talk about animations on the web, how you can make them simple, how you can make them better.

You can find me not on Twitter too much these days. I'm on the Cooler Blue Sky site. If you're not on Blue Sky, join. It's a lot more fun and nice over there. But let's dive into animations. Animations on the web have had a very, very fun history. Quick show of hands, or not show of hands, whoever's going to shout it out first, what browser had the first animation support? Anybody? You're all wrong. It was Internet Explorer. Internet Explorer. Internet Explorer. Internet Explorer. All the joys of Internet Explorer 5.5. Now you might be wondering, Mike, how did this happen? How did we get animations in Internet Explorer? Internet Explorer shipped with this really cool meta tag. Because this was around the time when we were still shipping separate HTML files for all of our different routes.

2. Evolution of Web Animations

Short description:

In the early days, web animations were achieved using meta tags and built-in browser transitions. However, with the decline of Internet Explorer 5.5, animations were lost until keyframe animations were introduced. These lacked fine-grained control. JavaScript animations, such as GreenSock, came later but required a lot of JavaScript code. The animation timeline was implemented as a set timeout, which was slow.

It was a simpler time. It was a better time. But they gave you this meta tag where you could define an Enter animation and an Exit animation. You'd give it the HTTP equiv. Then you would set the content to be a reveal transition, whether that was three seconds, 500 milliseconds. And then for the transition, you would actually have all of these built-in transitions provided by the browser for animating things from left to right, right to left, doing that nice little circle grow in the middle. Really, really top-notch stuff that existed in 1999, 2000. Really cool stuff.

And then Internet Explorer 5.5 died. And we lost this animation. We wouldn't see animations again until we got keyframe animations on the web, roughly around 2007. And this was something that Safari had first. We don't hear that often, but Safari had something first, folks. With keyframe animations, you would define a start and end point. And then using CSS, you'd be able to define that animation inside of your code. Now, this was great, because you could just code it and then have the animation play and take off. But the animation kind of lacked a lot of fine-grained control. You couldn't really catch it mid-animation. You were kind of off on your own.

JavaScript animations came along after that, where they basically re-implemented a JavaScript animation engine. And probably the one that people are most familiar with is GreenSock. There's nearly a dozen animation libraries out there. jQueryAnimate, anybody? The fun thing with these is that the animation would just work, but you'd have so much JavaScript to do simple things like this. If anyone's ever took a look at jQueryAnimate for fun Friday night reading, their animation timeline is a set timeout. You didn't shit. No one gasped at that. Yeah, thank you. Set timeout for an animation timeline is terrible, especially because this was before we had requestAnimationFrame. So code was very slow. It was great for the time.

QnA

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

The Whimsical Potential of JavaScript Frameworks
React Summit US 2023React Summit US 2023
28 min
The Whimsical Potential of JavaScript Frameworks
Top Content
The speaker discusses the whimsical and detailed work of Stripe, particularly their interactive and dynamic pages. They explain the use of React for building whimsical details and tracking mouse position. The speaker introduces React Spring for smooth animation and React3 Fiber for creating a 3D egg model. They also mention the use of Framer Motion and React server components for animating CSS properties.
Emotional & Functional UI Animations in React
React Day Berlin 2022React Day Berlin 2022
28 min
Emotional & Functional UI Animations in React
Today's Talk discussed the importance of UI animations in React, both functional and emotional. Examples were given using CSS and Framer Motion, with a focus on user feedback and accessibility. Design guidelines and animation usage were highlighted, as well as the consideration of negative emotions in animations. The Talk also touched on designing 404 error pages and concluded with gratitude to the audience and organizers.
React Native Animations Should Be Fun
React Advanced 2022React Advanced 2022
28 min
React Native Animations Should Be Fun
This talk is about animations in React Native, specifically focusing on React Native Reanimated. It covers the use of interpolations and extrapolations in animations, animating items in a carousel or list, sticky elements and interpolation, and fluidity and layout animations. The talk provides valuable tips and tricks for creating performant animations and explores the use of math formulas for natural movements.
Keep Scrolling
JSNation Live 2021JSNation Live 2021
33 min
Keep Scrolling
Scroll animations can enhance user experience when done properly, but should not distract from important information. CSS, JavaScript, and plugins like Scroll Trigger can be used to achieve scroll animations. GreenSock's ScrollTrigger provides a powerful JavaScript animation library for more complex animations. It is important to consider accessibility and provide reduced motion fallbacks. CodePen and GreenSock's documentation are valuable resources for learning and inspiration in creative coding.
Animation and Vue.js
Vue.js London Live 2021Vue.js London Live 2021
32 min
Animation and Vue.js
Today's Talk covers animation in Vue JS apps, including CSS animations, JavaScript animations using the GSAP library, and handling multiple elements with transition groups. The Talk also discusses different kinds of movements, state transitions, and animating numbers and SVGs. Overall, it provides a comprehensive overview of animation techniques and tools for enhancing Vue JS apps.
Animations with JS
JSNation 2022JSNation 2022
19 min
Animations with JS
Today's talk is about animations in Javascript, covering frame rates and different methods like CSS transitions and animations. JavaScript provides more control over animations, allowing interpolation and simulation of real-world scenarios. Different approaches to animating a box from zero to 100 pixels are discussed, including for loops, timers, and the web animations API. Request Animation Frame is highlighted as a solution for consistent and smooth animations. The Web Animations API is introduced as a powerful tool alongside CSS animations and transitions, although it has limited browser support.

Workshops on related topic

How to make amazing generative art with simple JavaScript code
JS GameDev Summit 2022JS GameDev Summit 2022
165 min
How to make amazing generative art with simple JavaScript code
Top Content
Workshop
Frank Force
Frank Force
Instead of manually drawing each image like traditional art, generative artists write programs that are capable of producing a variety of results. In this workshop you will learn how to create incredible generative art using only a web browser and text editor. Starting with basic concepts and building towards advanced theory, we will cover everything you need to know.