Skip to content

InputTag

Used to enter the label.

Basic usage

Basic usage of tag input.

Please input

Status

The input box has two states: disabled and readonly.

Tag1
Tag1

Max tags

Set the maximum number of display labels.

Tag1Tag2Tag33..

Size

Besides default size, tu-input-tag component provides three additional sizes for you to choose among different scenarios. Use attribute size to set additional sizes with mini, small, large.

Please input
Please input
Please input
Please input

InputTag API

InputTag Attributes

NameDescriptionTypeDefault
model-valueBind valueArray-
default-valueDefault value (uncontrolled state))Array[]
input-valueThe value of the inputString-
default-input-valueThe default value of the input (uncontrolled state)String''
placeholderPlaceholderString-
disabledWhether to disableBooleanfalse
errorWhether it is an error stateBooleanfalse
readonlyWhether it is read-only modeBooleanfalse
allow-clearWhether to allow clearBooleanfalse
sizeThe size of the inputStringmedium
max-tag-countThe maximum number of tags displayed, 0 means unlimitedNumber0
retain-input-valueWhether to keep the content of the input boxBooleanfalse
format-tagFormat tag contentFunction-
unique-valueWhether to create only unique valuesBooleanfalse
field-namesCustomize fields in TagDataInputTagFieldNames-

InputTag Events

NameDescriptionType
changeTriggered when the value changesFunction
input-value-changeTrigger when the input value changesFunction
press-enterTriggered when the enter key is pressedFunction
removeTriggered when the delete button of the label is clickedFunction
clearTriggered when the clear button is clickedFunction
focusTriggered when the input box gets focusFunction
blurTriggered when the input box loses focusFunction

InputTag Slots

NameDescription
tagDisplay content of tag
prefixPrefix
suffixSuffix