3.1.0 • Published 1 year ago

react-native-chip v3.1.0

Weekly downloads
68
License
MIT
Repository
github
Last release
1 year ago

React Native Chip

React navite component to represent a list with different functionalities on a chip view base on react-native-chips

Getting Started

npm i react-native-chip

Usage

import RemovableChips from 'react-native-chip/RemovableChips'

<RemovableChips label="Enter item" initialChips={["Person", "Chair"]} onChangeChips={(chips) => console.log(chips)} alertRequired={true}/>

import SelectableChips from 'react-native-chip/SelectableChips'

<SelectableChips initialChips={["Person", "Chair","Coma","Dog"]} onChangeChips={(chips) => console.log(chips)} alertRequired={false}/>

Properties RemovableChips

namedescriptiontypedefault
labelPlaceholder for the Text inputString'Enter Item'
initialChipsInitial Chips to be presentArray-
onChangeChipsTo get the value of chips in arrayFunction-
alertRequiredTo trigger alert on adding and removing chipsBooleanfalse
chipStyleChanging the style of chip elementsStyle Object-
valueStyleChanging the style of the value inside the chipStyle Object-
chipCloseStyleChanging the x close of the chipStyle Object-

Properties SelectableChips

namedescriptiontypedefault
initialChipsInitial Chips to be presentArray-
initialSelectedChipsInitial Selected Chips to be presentArray-
onChangeChipsTo get the value of selected chips in arrayFunction-
alertRequiredTo trigger alert on adding and removing chipsBooleanfalse
chipStyleChanging the style of chip elementsStyle Object-
valueStyleChanging the style of the value inside the chipStyle Object-
valueStyleSelectedChanging the style of the value inside the chip when is selectedStyle Object-
chipStyleSelectedChanging the style of chip elements when is selectedStyle Object-

Properties BasicChip

namedescriptiontypedefault
initialChipsInitial Chips to be presentArray-
alertRequiredTo trigger alert on adding and removing chipsBooleanfalse
chipStyleChanging the style of chip elementsStyle Object-
valueStyleChanging the style of the value inside the chipStyle Object-

Sample

demo_removablechips demo_selectablechips demo_complete

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change or reach me out via email gabr.933@gmail.com if you have an idea how i can improve the component.

License

react-native-chips is LICENSE @ Alexis Valenciano