animateTransform property does not work in RN iOS
See original GitHub issueOnly building an iOS app, so can’t talk for Android, but when the following is run, the svg appears but not the animation. I have tried importing the animateTransform
property too, still not working.
<Svg
width="38px"
height="38px"
viewBox="0 0 38 38"
xmlns="http://www.w3.org/2000/svg"
stroke="blue"
aria-label="spinner"
>
<G fill="none" fillRule="evenodd">
<G transform="translate(1 1)" strokeWidth="2">
<Circle strokeOpacity=".5" cx="18" cy="18" r="18" />
<Path d="M36 18c0-9.94-8.06-18-18-18">
<animateTransform
attributeName="transform"
type="rotate"
from="0 18 18"
to="360 18 18"
dur="1s"
repeatCount="indefinite"
/>
</Path>
</G>
</G>
</svg>
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:11 (2 by maintainers)
Top Results From Across the Web
animateTransform property does not work in RN iOS #1019
Only building an iOS app, so can't talk for Android, but when the following is run, the svg appears but not the animation....
Read more >SVG AnimateTransform not working in Safari..? - Stack Overflow
The animation can be toggled on and off once, but then again fails. According to the specs, animateTransform should be supported in Safari...
Read more ><animateTransform> - SVG: Scalable Vector Graphics | MDN
The animateTransform element animates a transformation attribute on its target element, thereby allowing animations to control translation, ...
Read more >How to Use “animateTransform” for Inline SVG Animation
The short answer is, the animateTransform element generates animations by setting transform properties on the SVG shape to which it's ...
Read more >Animations - React Native
Animations are very important to create a great user experience. ... Each property can be run through an interpolation first.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s relatively easy to write a function which translates the animate syntax to animated, e.g. like this: https://snack.expo.io/@msand/animatetransform
I just test it on my android emulator, it seems
ratateZ
can not be animated by settinguseNativeDriver
and I’m getting a runtime error.by the way, the generate animations going to be very slow when more SVG components exist on the screen. is it possible to animate the components using react-native-reanimated library? have you tried it before yourself and if yes how much the performance improved?