Input control for entering tags
npm install tag-input-jsyarn:``bash`
yarn add tag-input-js
Or via npm:
`bash`
npm install --save tag-input-js
Or include CDN link in HTML page:
`bash`
jsx
import TagInputControl from 'tag-input-js';const tagInstance = new TagInputControl(elementId | HTMLElement, options)
`Parameters
$3
>
stringThis is ID of HTML element that will host Tag Input Control
$3
>
HTMLElementThis is element instance of HTML element that will host Tag Input Control
$3
>
Object | optional`js
{
cssClass : {
tagPanel: 'tagi__panel', // class name of tag panel
tagElement: 'tagi__element', // class name of each tag
inputElement: 'tagi__input' . // class name of input control
},
renderRemoveButton: function(){}, // return custom remove button
initialTags: [], // list of tags will be shown on initial time
onTagChange: function(tagList){} // callback function will be execute everytime tag list changes
}
`Example
`HTML
Tag Input - Example
`Contribute
That will be great if you pull requests and help the code betterBuild
`bash
npm run build
`Tests
`bash
npm run start
npm run test
``