Tag

Tag item

Install

import {Tag} from '@xsolla/uikit'

Examples

Primary
Lorem
Lorem
Selected
Secondary for Input Tag
Selected
Disabled
Disabled

Usage

<Tag
    selected={item.selected}
    disabled={disabled}
    value={item.value}
    onClick={
      item.selected
        ? () => remove(selectedItems.indexOf(item.value))
        : () => selectedItems.push(item.value)
    }>
    {item.label}
</Tag>

API

PropertyDescriptionTypeDefault
childrencontentany
appearancecan be set to primary or secondarystringprimary
selectedset the selected status of tagboolfalse
disabledset the disabled status of tagboolfalse
onClickset the onClick handler of tagfunc
valueset the data-value attribute of elementany
dataIdattribute for data identifierstring