Font awesome spinner not spinning Font awesome spinner not spinning vue.js vue.js

Font awesome spinner not spinning


You can add the spin directive.

<font-awesome-icon icon="spinner" spin />

Docs: https://github.com/FortAwesome/vue-fontawesome#basic


This works for me:

<template>  <div>    <font-awesome-icon icon="spinner" class="fa-spin" />  </div></template>

Font Awesome v.5, Vue.js v.2 (with @vue/cli 3)


Unless times have changed, Font Awesome does not provide out-of-the-box tools to animate their font and graphic libraries. They simply provide the service of offering single-colored, vector-graphic libraries formatted for various needs: true-type fonts (TTF), scalable vector graphics (SVG), etc.

You'll need to do the animation work yourself. Fortunately, it's very short work with CSS plus you'll get to control the speed of your spinner spinning.

/* Define an animation behavior */@keyframes spinner {  to { transform: rotate(360deg); }}/* This is the class name given by the Font Awesome component when icon contains 'spinner' */.fa-spinner {  /* Apply 'spinner' keyframes looping once every second (1s)  */  animation: spinner 1s linear infinite;}

I've updated the Glitch workspace you created (very helpful) with the additional CSS lines above to animate. Adjust accordingly and good luck!