1.1.9 • Published 1 month ago

@synerise/ds-tag v1.1.9

Weekly downloads
-
License
ISC
Repository
github
Last release
1 month ago

id: tag

title: Tag

Tag UI Component

Installation

npm i @synerise/ds-tag
or
yarn add @synerise/ds-tag

Usage

import Tag from '@synerise/ds-tag'

<Tag />

Demo

API

PropertyDescriptionTypeDefault
classNametag container classstring-
colorprimary color (background/border) of tagstring-
disabledwhether tag should be disabledboolean-
idid of tag (necessary if using Tags)string / number-
nametitle of tagstring-
onClickonClick event on tag body() => void-
onRemovecallback when tag is removed(tagKey: string / number) => void-
removableshow remove buttonboolean-
shapeshape of the tagTagShapeTagShape.DEFAULT_ROUND
textColorcolor of tag name labelstring-
dashedmake border dashedboolean-

TagShape Enum

Property
TagShape.SINGLE_CHARACTER_ROUND
TagShape.SINGLE_CHARACTER_SQUARE
TagShape.DEFAULT_ROUND
TagShape.DEFAULT_SQUARE
TagShape.SMALL_ROUND
TagShape.SMALL_SQUARE
TagShape.STATUS_NEUTRAL
TagShape.STATUS_SUCCESS
TagShape.STATUS_ERROR
TagShape.STATUS_WARNING