1.0.5 • Published 2 years ago

custom-react-tags v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

custom-tags

Tags input library for react

NPM JavaScript Style Guide

Install

npm i custom-react-tags

Usage

import React, { Component } from 'react'

import CustomTags from 'custom-react-tags'
import 'custom-react-tags/dist/index.css'

class Example extends Component {
  render() {
    return <CustomTags />
  }
}

image

PropsExampleTypeDetails
addNewTextaddNewText="+ Add New Tag"stringFor showing the add new button text
initialValueinitialValue={[{label: "Firstone", editable: false, remove: false}, { label: "Test 2", remove: true, editable: true }]}arrayFor setting initial value. You can pass the remove: true/false for individual tags if you want to allow remove or not a specific tag. Use the editable: true/false to make each tag editable or not. New tags added are always editable, this is only for initialvalue.
closeColorcloseColor="white"stringFor close icon color
closeBGColorcloseBGColor="red"stringFor the background color of the close icon
tagTextColortagTextColor="darkred"stringFor setting text color of each tag
tagTextColortagTextColor="darkred"stringFor setting text color of each tag
tagColortagColor="pink"stringFor setting the background color of a tag
addBtnColoraddBtnColor="red"stringFor setting the color of the add button text
onChangeonChange={(data) => { }}functionFor getting the updated values of the tags

License

MIT © kashyap-sith