1

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?

enter image description here

Rajitha Perera
  • 1,581
  • 5
  • 26
  • 42

1 Answers1

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