Tags

Tags UI Component

Demo

Tag 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-

Tags API (Group of
)

PropertyDescriptionTypeDefault
addableAllow adding tags from data (which are not present in selected)boolean-
classNameTag Group container classstring-
creatableAllow creating new tagsboolean-
dataAll available tagsTag[][]
disabledDisable entire group (all tags)boolean-
manageLinkoptional link visible in add tag dropdownstring-
onCreatefired whenever a new tag has been created(tagName: string) => void-
onSelectedChangefired whenever the list of selected tags changes(tags: Tag[], actionTaken: ActionTaken) => void-
removableAllow removing tags from selectedboolean-
styleTag Group container stylesReact.CSSProperties-
selectedSelected tagsTag[][]
tagShapeShape of tagsTagShape-
textsnecessary texts to render tags groupTagsTexts{}

ActionTaken

PropertyDescriptionType
tagAffected tagTag
typeType of action taken that caused onSelectedChange to be called'ADD' / 'REMOVE'

TagsTexts

PropertyDescriptionTypeDefault
addButtonLabelLabel for add tag buttonstring / React.ReactNode
clearTooltipTooltip text displayed on search clear icon hoverstring / React.ReactNode
deleteTooltipTooltip text displayed on remove icon hoverstring / React.ReactNodeDelete
searchPlaceholderSearch input placeholder for add tag dropdownstring
manageLinkLabelLabel for manage link for add tag dropdownstring / React.ReactNode
createTagButtonLabelLabel for create tag button for add tag dropdownstring / React.ReactNode
noResultsLabelLabel displayed when filtering tags returns an empty arraystring / React.ReactNodeNo results
dropdownNoTagsText for a label displayed when no tags are found to be addedstring / React.ReactNode

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