react-tag-selector is a react component for the tag selection functionality.
Use the package manager npm to install react-tag-selector.
npm link https://github.com/shrilakshmishastry/react-tag-selector
import TagSelector from 'react-tag-selector';
const filterTag = [
'python',
'js',
'java',
'c==',
'c++',
'go',
'groovey'
];
function App() {
return (
<TagSelector
selectedTag={(value) => {
console.log(value)
}}
removeTag={(value) => {
console.log(value);
}}
tagsFilter={filterTag} />
);
}
export default App;
Syntax | Description |
---|---|
selectedTag | callBack function which receives the value selected from the array of tags |
removeTag | callback function which receives the value removed from the array of tags |
tagsFilter | an array of tags available |
lableForInputTag | string to handle aria |
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.