TagsInput

In progress
ARIA
RTL

TagsInput is an extension of the text input fields. This component allows users to both enter text and capture input results and display them as well.

These selected text entries are being displayed as tags. Tags represent a set of interactive keywords that help organize and categorize objects.

Tags can be added by pressing the Enter key or removed by Backspace key or the mouse click from the input element.

TagsInput

Default

Different sizes

States

Preset data
Preset data

Uppercase & lowercase

Preset data
Preset data

TagsInput props

NameTypeRequiredDefaultDescription
selectedstring[]Yes-The selected dataset
labelstring | undefinedNo-Label title
sizesm | md | lgNomdInput size
typedate | datetime-local | email | number | password | search | tel | text | time | url | stringNotextInput type
placeholderstringNo-Placeholder for input
isErrorbooleanNofalseSets error state for input
disabledbooleanNofalseSet disabled/non-disabled
classNamestringNo-Tailwind classes for customization
onEnter(value: string) => void;No-The function to select the text and append it to the tag set.
onClear(index: number) => voidNo-The function to remove the selected tag.

TagsInput.SelectedItem

NameTypeRequiredDefaultDescription
classNamestringNo-Tailwind classes for customization
indexnumberYes-This data spcifies the key value of the item
labelstringYes-The text selected as tag