I see that someone made this for it: https://github.com/brentvatne/react-native-linear-gradient
But is there support for it in RN itself? Something like
style = StyleSheet.create({ backgroundGradient: "vertical", backgroundGradientTop: "#333333", backgroundGradientBottom: "#666666" });
To add a linear-gradient background in a React component, we can put the linear-gradient value in the style prop object. to set the background property to "linear-gradient(#e66465, #9198e5)" .
Not at the moment. You should use the library you linked; they recently added Android support and it is by one of the main contributors of react-native.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With