react-input-tags-hooks

A lightweight React component modal image.

Usage no npm install needed!

<script type="module">
  import reactInputTagsHooks from 'https://cdn.skypack.dev/react-input-tags-hooks';
</script>

README

📋 React input tags using hooks

A lightweight React component input tags.

Demo

bundlephobia badge bundlephobia badge bundlephobia badge

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} // return array of tags
  tagColor='#48c774' 
  placeHolder="Press enter to add tags"
/>

Examples:

const App = () => {

  const [tags, setTags] = useState([])

  const getTags = (tags) => {
    setTags(tags);
  }

  return (

    <InputTags
      onTag={getTags}
      tagColor={'#48c774'}
      placeHolder="Press enter to add tags"
    />
  );
}

License

MIT