sticky-parallax-header
sticky-parallax-header copied to clipboard
Animated Color Props for Custom Header
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 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
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
:
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