0.0.3 • Published 7 years ago

pb-react-mdchips v0.0.3

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

Material Design Input Chips - ReactJs

Deps ScreenShot DEMO

##Getting Started

npm install react-mdchips

##Usage

In your html file, make sure to include the materializeCss file Also please add this css file, which you can customize to your taste. Note: Add the css file below the materializeCss file.

import MdInputChips from "react-mdchips";

<MdInputChips 
  placeholder="React Tags" 
  containerClassName="outer-tags-div"
  chips=["xx", "cv"]
  inputClassName="tags-input"
  max="10"
  onBlur={this.onBlurEvt.bind(this)}
  onEnter={this.onEnterEvt.bind(this)}
  onDelete={this.onDeleteEvt.bind(this)}
/>
PropsDescrition
placeholderDefault input text you want to display to the user. (optional)
chipsYou can use this to display a default array of chips e.g "xx", "cv". (optional)
containerClassNameCustom classname to style the outer layer of the whole chips. (optional)
inputClassNameYou can add your custom class name to style the input text box. (optional)
maxInteger - Max Number of chips you want to allow. (optional, default: 20)
onBlurfunction - Accept function that returns array of chips on blur event
onEnterfunction - Accept function that returns array of chips on enter keypress or tab event