In my react native application I have a font awesome icon. I want to rotate it. Help is needed.
import React from 'react'
import { View } from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome5';
const InfoBox = () => {
return (
<View >
<Icon name={'hand-holding-usd'} size={20}/>
</View>
)
}
export default InfoBox;
To arbitrarily rotate and flip icons, use the fa-rotate-* and fa-flip-* classes when you reference an icon.
You can rotate icon by 90, 180 and 270 degrees. To do that, add rotate attribute. Possible values: "90deg", "1": rotate by 90 degrees.
You can use the style
prop to rotate the icon. Change the degree/direction of rotation as required
<Icon name={'hand-holding-usd'}
size={20}
style={{transform: [{rotateY: '180deg'}]}}/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With