0

I'm adding individual icons explicitly as shown here: https://fontawesome.com/v6/docs/web/use-with/react/add-icons#add-some-style

The code I'm using is:

import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faRocket } from '@fortawesome/free-solid-svg-icons' 

...
<FontAwesomeIcon icon={faRocket} flip />
...

It seems like most of the other animations work. When I replace 'flip' with 'spin', for example, the icon spins. I can't get it to flip.

Also worth mentioning, when I wrote the code like this:

<i class="fa-solid fa-rocket fa-flip"></i>

The flip animation worked.

pcmila
  • 23
  • 5

1 Answers1

0

If you take a closer look to the FontAwesomeIcon component you'll see all the props it can receive and what are the expected values for them.

In the case of flip it only takes three posible values but you need to specify which one you wanna use, otherwise It won't work.

As an example, your component would look like this:

<FontAwesomeIcon icon={faRocket} flip='vertical' />

fontawesome props

Sonia
  • 31
  • 1