Here I have attached one image. That bar has a dark and light blue color mix according to image.how can I achieve that task?
Asked
Active
Viewed 214 times
1
-
1You need to add a linear gradient from `dark blue` to `light blue` – Pritish Vaidya Aug 20 '18 at 17:06
-
Thanks. That should be the method. – Rajitha Perera Aug 20 '18 at 17:11
1 Answers
1
Use the react-native-linear-gradient library:
import { StyleSheet } from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
const styles = StyleSheet.create({
linearGradient: {
width: 40px, height: 250px
}
})
...
render() {
<LinearGradient colors={['#319CF7', '#BDE0FB']} style={styles.linearGradient} />
}

gazdagergo
- 6,187
- 1
- 31
- 45