Search code examples
react-nativereact-native-reanimated

How to hide svg with react-native-reanimted when height is collapsing


I'm trying to achieve an animation on blur and focus of TextInput with react-native-reanimated when the keyboard is opening or dismissing, the height will collapse but the problem here is if we have an SVG inside Animated.View it will not collapse like text

logo before collapsing

another pic after collapsing

code on expo

any improvements on the code will be appreciated too


Solution

  • Try to add overflow: 'hidden' to your logoContainer style. Tested on my device, I think it behaves the way you want it.

    Hope this helps!