Background Images & Gradients
You can use background-image properties to
Background Image#
@see https://developer.mozilla.org/en-US/docs/Web/CSS/background
Using the background-image property or the shorthand background property, you can easily set multiple ImageBackgrounds and gradients for components. Under the hood, gradients use react-native-svg.
The background images are drawn on stacking context layers on top of each other. The first layer specified is drawn as if it is closest to the user.
Syntax#
info
Depending on your setup, you might need to use require('...').default for local images instead.
Linear Gradient#
@see https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient()
Radial Gradient#
@see https://developer.mozilla.org/en-US/docs/Web/CSS/radial-gradient()