ts-react-tag
Abstract:
Here you will find a ReactJS component with which you can display your data as tag.
Features:
- Design based on Material-UI
- Properties to help you with an individual design
- Functions as properties to help with the further use of the data
- TypeScript implementation
- ...
Installation
npm install --save ts-react-tag
Usage
import {
Tag
} from 'ts-react-tag';
...
<Tag />
CSS
./node_modules/ts-react-tag/dist/index.css;
Properties
Property | Type | Required | Default | Info |
---|---|---|---|---|
avatarSrc | string | false | Gravatar standard icon | source for your avatar |
color | string | false | default | default, primary, seconday |
disabled | boolean | false | false | |
hideOnDelete | boolean | false | true | |
id | string | false | 'TsdevReactTag' | |
isHidden | boolean | false | false | |
label | string | false | 'Label' | |
labelMaxLength | number | false | 30 | max characters for label |
onDelete | func | false | noop | first argument is an object with properties |
showAvatar | boolean | false | true | |
showDelete | boolean | false | true | |
showValue | boolean | false | true | |
subClass | string | false | '' | |
value | number | false | 0 | |
valueColor | string | false | primary | default, primary, seconday |
variant | string | false | default | default, outlined |