react-native-animated-linear-gradient icon indicating copy to clipboard operation
react-native-animated-linear-gradient copied to clipboard

I want to make a gradient background color same attachment below

Open phanthinh opened this issue 7 years ago • 2 comments

Thank lib for support gradient background. However, i want to make a gradient background same attachment below and color from bottom to top. How i can setting it on this lib

Thank you so much screen shot 2017-10-30 at 21 50 30

phanthinh avatar Oct 30 '17 14:10 phanthinh

Hi @phanthinh
I add a new prop points for custom gradient direction. Like below:

<AnimatedLinearGradient points={{start: {x: 0.5, y: 0}, end: {x: 0.5, y: 1}}} /> // this will generate a vertical direction gradient.

If you just want a static linear gradient , you can use react-native-linear-gradient directly.

heineiuo avatar Nov 01 '17 02:11 heineiuo

Currently This will not put the text on top. It will move the gradient down. Any Ideas?

<AnimatedLinearGradient customColors={mycolors.one} speed={1000} points {direction.horizontal}> <Text>Orange Fun</Text> </AnimatedLinearGradient>

weathermanJM avatar Feb 01 '18 10:02 weathermanJM