@astralservices/react-chip
v1.0.0
Published
Manage a list of chips based on a strings list.
Downloads
10
Maintainers
Readme
React Chip
Manage a list of chips based on a strings list.
Modified from https://github.com/cjpatolio/react-chip
Install
Install with npm
$ npm install @astralservices/react-chip
Install with Yarn
$ yarn add @astralservices/react-chip
Usage
import React from 'react'
import ReactChip from '@astralservices/react-chip'
// basic usage
<ReactChip onChange={chips => {console.log(chips)}} />
// advanced usage
<ReactChip
defaultChips={[]}
id=""
name=""
labelClass=""
inputClass=""
chipClass=""
focusClass=""
regex={/(\+|\-)?astral\.(?:\*|(?:(?:\w+|\*)\.(?:\*|\w+)))/}
onChange={(chips) => {
console.log(chips)
}}
/>
License
Designed with ♥ by CJ Patoilo.
Forked by Astral Services.
Licensed under the MIT License.