Tags Input component for React

taginput-react

Tags input component in react.

How to Install

Make sure you have Node.js and NPM installed.

npm install taginput-react

Or

yarn add taginput-react How to Use

import React, { useState } from 'react' import TagsInput from 'taginput-react' const TagsInputDemo = () => { const [tags, setTags] = useState([]) const handleOnChange = (data) => { setTags(data) } return ( <TagsInput onChange={handleOnChange} placeholder="Enter to add" /> ) } Demo

Check out Online Demo here.

Available Props
Prop Name Type Default Value Description
tags array [] Initial Tags
placeholder String 'Enter to add' Input placeholder
onChange Function null Callback function to get the entered Tags by user
tagClassName String '' Used to style tag element

版权声明:

1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。
2、网站不提供资料下载,如需下载请到原作者页面进行下载。