The role of web animation goes well beyond that of being a mere piece of decoration. You can use it to guide web visitors’ attention, to organize information and make it easier to digest, to make waiting for content to load feel snappier and more entertaining, and more.
https://blog.logrocket.com/css-transitions-101-lets-animate-a-toggle-button-icon-333967f5b971