@astralservices/react-chip
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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.

Package Sidebar

Install

npm i @astralservices/react-chip

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

37.4 kB

Total Files

12

Last publish

Collaborators

  • jackmerrill