1.0.3 • Published 5 months ago
react-native-color-gradient v1.0.3
Install:
npm install react-native-color-gradient
Example :
import { StyleSheet, SafeAreaView, View } from 'react-native'
import React from 'react'
import Picker from 'react-native-color-gradient'
export default function App() {
return (
<SafeAreaView style={styles.container}>
<View style={styles.box}>
<Picker width={300} />
</View>
</SafeAreaView>
)
}
const styles = StyleSheet.create({
container: { flex: 1 },
box: { flex: 1, justifyContent: 'center', alignItems: 'center' }
})
Prop | Type | Default | Description |
---|---|---|---|
width | number | screen | length and width of the color palette |
initColor | string | #000 | original color |
numberColumn | number | 10 | number of columns |
numberRow | number | 10 | number of rows |
style | object | 100 | style |
hideColorSelected | boolean | false | Hide selected color block and slider |
Event props :
onChange
Callback function when changing color
Prop | Type | Description |
---|---|---|
color | string | color selected |