sticky-parallax-header icon indicating copy to clipboard operation
sticky-parallax-header copied to clipboard

Animated Color Props for Custom Header

Open Ouzx opened this issue 2 years ago • 1 comments

How can I use Animated Colors in custom header styling props? For example: tabsContainerStyle={{ backgroundColor: scrollY.y.interpolate({ inputRange: [0, 100], outputRange: [Colors.transparentBg, Colors.mainBG], }), }}

I'm using TabbedHeader btw.

Ouzx avatar Dec 10 '21 02:12 Ouzx

@Ouzx with v1.0.x in TabbedHeaderPager (new TabbedHeader) we are using plain FlatList, so it's not possible now, to pass such animated style/value. Also with v1.0.x, we are sticking with react-native-reanimated instead of vanilla Animated API, but we'll work on supporting animated styles

mateusz1913 avatar Jun 19 '22 17:06 mateusz1913

Hi! I have upgraded to v1.0x and now i need to set tabUnderlineColor={color} as an interpolate color and i dont know how to add it correct. Here is my code and my error. Please give me an example Skärmavbild 2022-08-21 kl  17 51 23 Skärmavbild 2022-08-21 kl  17 52 15 :

Karlssonr89 avatar Aug 21 '22 16:08 Karlssonr89

Hi @Digituals, react-native-sticky-parallax-header is supporting animated (with Reanimated v2) color props from version 1.0.0-rc.8. There's dedicated docs section and you can also check how it works in example repo

mateusz1913 avatar Aug 23 '22 11:08 mateusz1913