npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jamieparkinson/material-ui-chip-input

v0.13.0

Published

A chip input field using Material-UI.

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

If you want to try the component yourself instead of watching a gif, head over to the storybook for a live 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, index) => handleDeleteChip(chip, index)}
/>

Properties

| Name | Type | Default | Description | | --- | --- | --- | --- | | chipRenderer | function | | A function of the type ({ value, text, isFocused, isDisabled, handleClick, handleRequestDelete }, key) => node that returns a chip based on the given properties. This can be used to customize chip styles. | | clearOnBlur | bool | true | Clears the input value after the component looses focus if set to true. | | dataSource | array | | Data source for auto complete. | | dataSourceConfig | object | | Config for objects list dataSource, e.g. { text: 'text', value: 'value' }. If not specified, the dataSource must be a flat array of strings. | | defaultValue | string[] | | The chips to display by default (for uncontrolled mode). | | disabled | bool | false | Disables the chip input if set to true. | | errorText | node | | The error text to display. | | floatingLabelText | node | | The content of the floating label. | | fullWidth | bool | false | If true, the chip input will fill the available width. | | fullWidthInput | bool | false | If true, the input field will always be below the chips and fill the available space. By default, it will try to be beside the chips. | | hintText | node | | The hint text to display. | | id | string | a unique id | The id prop for the text field, should be set to some deteministic value if you use server-side rendering. | | newChipKeyCodes | number[] | [13] (enter key) | The key codes used to determine when to create a new chip. | | onChange | function | | Callback function that is called when the chips change (in uncontrolled mode). | | onRequestAdd | function | | Callback function that is called when a new chip was added (in controlled mode). | | onRequestDelete | function | | Callback function that is called when a new chip was removed (in controlled mode). | | onTouchTap | function | | Callback function that is called when text input is clicked. | | onUpdateInput | function | | Callback function that is called when the input changes (useful for auto complete). | | openOnFocus | bool | false | Opens the auto complete list on focus if set to true. | | style | object | | Override the inline-styles of the root element. | | value | string[] | | The chips to display (enables controlled mode if set). |

Additionally, most other properties of Material UI's Auto Complete and Text Field should be supported. Please open an issue if something is missing or does not work as expected.

Credits

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

License

The files included in this repository are licensed under the MIT license.