JSPM

  • Created
  • Published
  • Downloads 22854
  • Score
    100M100P100Q153275F
  • License MIT

A chip input field using Material-UI.

Package Exports

  • material-ui-chip-input

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (material-ui-chip-input) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

material-ui-chip-input

This project provides a chip input field for Material-UI. It is inspired by Angular Material's chip input.

Demo

Installation

npm i --save material-ui-chip-input

Usage

The component supports either controlled or uncontrolled input mode. If you use the controlled mode (by setting the value attribute), the onChange callback won't be called.

import ChipInput from 'material-ui-chip-input'

// uncontrolled input
<ChipInput
  defaultValue={['foo', 'bar']}
  onChange={(chips) => handleChange(chips)}
/>

// controlled input
<ChipInput
  value={yourChips}
  onRequestAdd={(chip) => handleAddChip(chip)}
  onRequestDelete={(chip) => handleDeleteChip(chip)}
/>

Properties

Coming very soon.

Credits

The code for the input component was adapted from Material UI's TextField that we all know and love.

License

The scripts included in this repository are licensed under the MIT.