1.0.8 • Published 1 year ago

chips-input-lib v1.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Chips Input

For input multiple texts as chips.

Installation

npm i chips-input-lib

Usage

The component can be used as below.

  • View sample

  • Source

import { ChipsInput } from 'chips-input-lib';


const onAddChips = (cities) => {
  console.log(cities);
};

function App() {
  return (
    <div className="App">
      <ChipsInput onAddChips={onAddChips} placeholder="Insert Cities"/>
    </div>
  );
}

export default App;

Properties

NameTypeDefaultDescription
placeholderstringPlaces holder of the text input.
onAddChipsfuncA callback function type of (texts) => that is called when a new chip is added.
chipBgColorstring#f5f5f5Background color of the chips.
chipColorstring#9b9b9bFont color of the chips.
widthstringThe width of the chips input can be changed. Example: '480px','100%'
fontFamilystringinheritTo change the font family of the ChipsInput. Example '"Gill Sans", sans-serif'
chipFontSizestringinheritThe font size of the chips. Example: '12px'
inputFontSizestringinheritThe font size of the input text. Example: '12px'

License

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

1.0.8

1 year ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago