@paraboly/react-native-multiselect
v0.0.4
Published
Beautiful multi select component for React Native
Downloads
11
Maintainers
Readme
Basic Multiselect Button Screenshots
Installation
Add the dependency:
npm i @paraboly/react-native-multiselect
Peer Dependencies
"react": ">= 16.x.x",
"react-native": ">= 0.55.x",
"lodash": ">= 4.17.15",
Usage
Import
import Multiselect from "@paraboly/react-native-multiselect";
Usage
Do not forget to check Example Data to make it work
<Multiselect
data={staticData}
onPress={res => console.log(res)}
onChange={res => console.log(res)}
/>
Example Data
const staticData = [
{
id: 0,
text: "Yüksek",
features: {
height: 40,
width: 70,
activeButtonColor: "#a085af",
inactiveButtonColor: "#dbdbdb",
activeTextColor: "#eaeaea",
inactiveTextColor: "#848484"
}
},
{
id: 1,
text: "Orta",
features: {
height: 40,
width: 70,
activeButtonColor: "#a085af",
inactiveButtonColor: "#dbdbdb",
activeTextColor: "#eaeaea",
inactiveTextColor: "#848484"
}
},
{
id: 2,
text: "Düşük",
features: {
height: 40,
width: 70,
activeButtonColor: "#a085af",
inactiveButtonColor: "#dbdbdb",
activeTextColor: "#eaeaea",
inactiveTextColor: "#848484"
}
}
];
Configuration - Props
| Property | Type | Default | Description | | ------------------- | :------: | :-------: | ------------------------------------------------------------------------------------ | | height | style | 40 | set your own height | | width | style | 70 | set your own width | | activeButtonColor | style | #a085af | use this to change the active color of the button | | inactiveButtonColor | style | #dbdbdb | use this to change the inactive color of the button | | activeTextColor | style | #eaeaea | use this to change the active color of the text | | inactiveTextColor | style | #848484 | use this to change the inactive color of the text | | onChange | function | undefined | you can make your business logic or get the selection of the data from this function | | onPress | function | undefined | onPress function for each of them |
Author
Şevval Eygül
License
React Native Multiselect Button Group is available under the MIT license. See the LICENSE file for more info.