If we follow along to font-awesome documentation, we can animate our spinner like so: Now, there are two ways we can go about animating our SVG.
I’m picking the spinner SVG from the font awesome 6 packages. Let’s get to an example, shall we? Animating an SVG Image There are some negatives to this approach like performance and browser compatibility (pesky IE!) so bear this in mind when selecting this approach. Do I use CSS to animate an SVG or PNG?That works too! The easiest way if you ask me to accomplish getting an animated loader, is to find a static SVG you like (needs to be a circle in this example) and apply some CSS to it.