custom-react-tags

1.0.5 • Public • Published

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

Props Example Type Details
addNewText addNewText="+ Add New Tag" string For showing the add new button text
initialValue initialValue={[{label: "Firstone", editable: false, remove: false}, { label: "Test 2", remove: true, editable: true }]} array For 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.
closeColor closeColor="white" string For close icon color
closeBGColor closeBGColor="red" string For the background color of the close icon
tagTextColor tagTextColor="darkred" string For setting text color of each tag
tagTextColor tagTextColor="darkred" string For setting text color of each tag
tagColor tagColor="pink" string For setting the background color of a tag
addBtnColor addBtnColor="red" string For setting the color of the add button text
onChange onChange={(data) => { }} function For getting the updated values of the tags

License

MIT © kashyap-sith

Dependencies (1)

Dev Dependencies (20)

Package Sidebar

Install

npm i custom-react-tags

Weekly Downloads

3

Version

1.0.5

License

MIT

Unpacked Size

68.9 kB

Total Files

8

Last publish

Collaborators

  • kashyap_sith