react-native-chip-picker

1.5.0 • Public • Published

React Native Chip Picker

A react native selector component.

Renders a list of items to be selected from into a group of chips to be clicked.

Example Usage

A user is to input their veggieness. The items to be selected from are: Carnivore, Pescatarian, Vegetarian, Vegan.

import ChipPicker from 'react-native-chip-picker';
 
<ChipPicker
    items={['Carnivore', 'Pescatarian', 'Vegetarian', 'Vegan']}
    value={this.state.value}
    onValueSelect={(selectedItem) => this.setState({value: selectedItem})}
/>

Props

items

A list of items to be rendered.

value

The currently selected value.

onValueSelect

A function which does something with the selected value.

selectedColour

(Optional)

The colour which you would like the background of the selected item to be.

Readme

Keywords

none

Package Sidebar

Install

npm i react-native-chip-picker

Weekly Downloads

0

Version

1.5.0

License

MIT

Unpacked Size

4.82 kB

Total Files

5

Last publish

Collaborators

  • 54m