0.0.5 • Published 3 years ago
react-input-tags-hooks v0.0.5
📋 React input tags using hooks
A lightweight React component input tags.
Demo
npm i react-input-tags-hooks
Usage
import InputTags from "react-input-tags-hooks";
import 'react-input-tags-hooks/build/index.css'; // required
<InputTags
onTag={getTags} // returns array of tags
color='#48c774'
placeHolder="Press enter to add tags"
/>
Examples:
const App = () => {
const [tags, setTags] = useState([])
const getTags = (tags) => {
setTags(tags);
}
return (
<InputTags
onTag={getTags}
color={'#48c774'}
placeHolder="Press enter to add tags"
/>
);
}
License
MIT