1.0.6 • Published 4 years ago

react-native-multiple-choice-picker v1.0.6

Weekly downloads
19
License
ISC
Repository
github
Last release
4 years ago

react-native-multiple-choice-picker

A cross-platform (iOS / Android) multiple-choice component for React Native.

Getting Started

Installing

npm i react-native-multiple-choice-picker

Or

yarn add npm i react-native-multiple-choice-picker

Basic Usage

<MultipleChoice
  choices={['Football', 'Soccer']}/>

example

<MultipleChoice
  direction={'column'}
  choices={['Football', 'Badminton', 'Basketball', 'Tennis']}/>

example

<MultipleChoice
  renderCustomItem={() => {
    return <Text style={{ color: 'red', fontWeight: 'bold' }}>Basketball</Text>
  }}
  chosenColor={'red'}
  chosenTextColor={'black'}
  customIndex={0}
  direction={'column'}
  choices={['Football', 'Badminton', 'Basketball', 'Tennis']}/>

example

Props

NameDescriptionDetails
choicesLabels of multiple choice componentrequiredarray: []
chosenIndexCurrently chosen indexnumber: 0
onPressEvent handler when clicking at a choicefunction: () => {}
styleStyle of containerobject: {}
directionMultiple choice can be render in row or column directionstring: 'row' / 'column'
chosenColorColor of the chosen componentstring: '#e2641e'
chosenTextColorColor of the chosen labelstring: '#e2641e'
TouchableComponentCustom choosing compoenentcomponent: DefaultTouchableComponent
outerRoundDimension of outer round of the choosing componentnumber: 24
innerRoundDemision of inner round of the choosing componentnumber: 16.8
renderCustomItemRender custom label componentfunction: () => {}
customIndexIndex to render custom label componentnumber: -1