Home > Software design >  React-native - Pulsating Image / SVG
React-native - Pulsating Image / SVG

Time:09-19

Is it possible to pulsating a SVG in a Component? And how can i do this? I found some packages but pulsating a circle, i want to pulsating a bag (SVG)

CodePudding user response:

Yes, it's possible. react-native-svg allows you to import SVGs (with some setup), or you can use its primitives to convert an SVG to RN components. Then to animate it, use React Native's Animated API. The fade in/out example on the API page can be easily adapted to make a pulsing animation.

  • Related