rn-multiple-select
Library for creating a custom multiple option selector for React Native
Install
$ npm install rn-multiple-select
ou
$ yarn add rn-multiple-select
Required Props
options
| ArrayonSelected
| Function
Basic Example
;; ; { const data setData = ; { console; } return <View style=stylescontainer> <SelectMultiple options=data onSelected=onSelectionsChange styles= containerStyle: backgroundColor: 'transparent' borderColor: 'transparent' checkedColor: 'green' size=24 /> </View> ;} const styles = StyleSheet;
Properties
Prop | Default | type | Desciption |
---|---|---|---|
options | null | array of object |
The items |
onSelected | null | funct |
Function to be called after an item is selected, passing the selected items and the new item that was clicked, either selecting or deselecting the item |
styles | {} | object |
Stylization for checkboxes |
iconType | 'font-awesome' | string |
Type of Icon |
size | 24 | number |
Check box size |
iconRight | false | boolean |
Icon to the right of the text |
checkedIcon | 'check-square-o' | string ou React Native Component |
Default icon checked |
uncheckedIcon | 'square-o' | string ou React Native Component |
Default icon unchecked |
checkedTitle | none | string |
Specify a message for a marked checkbox |
- Prop of
styles
:containerStyle
: Checkbox main container style (background and etc).textStyle
: Style of text.checkedColor
: Default color for a selected item.uncheckedColor
: Default color for a unselected item.fontFamily
: The font-family of texts.