Skip to content

sam-drew/react-native-chip-picker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A react native selector component.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published