Skip to content

InputTags

Components4.9.2

InputTags

import InputTags from '@semcore/ui/input-tags';
typeInputTagsProps
Omit<InputProps"size"> & ScrollAreaProps & {...}
PropertyDescription
size

Component size

onAdd
(value: string, event: React.KeyboardEvent | React.ClipboardEvent) => void
deprecated use `onAppend` instead

Event is called when tag needs to be added

onAppend
(values: string[], event: React.KeyboardEvent | React.ClipboardEvent) => void

Event is called when tags need to be added

onRemove
(event: React.KeyboardEvent | React.MouseEvent) => void

Event is called when tags need to be removed

delimiters
string[] = [',', ';', '|', 'Enter', 'Tab']

List delimiter of tags. Don't forget to add 'Enter' and 'Tab' to hande corresponding hotkeys.

InputTags.Value

import InputTags from '@semcore/ui/input-tags';
<InputTags.Value />;
typeInputTagsValueProps
InputValueProps & {...}

InputTags.Tag

Styled component Tag.

import InputTags from '@semcore/ui/input-tags';
<InputTags.Tag />;
typeInputTagsTagProps
TagProps & {...}
PropertyDescription
editable
boolean

Property enabling the ability to remove a tag on click

InputTags.Tag.Addon

import InputTags from '@semcore/ui/input-tags';
<InputTags.Tag.Addon />;

Inherited from the Tag.Addon component.

InputTags.Tag.Text

import InputTags from '@semcore/ui/input-tags';
<InputTags.Tag.Text />;

Inherited from the Tag.Text component.

InputTags.Tag.Close

import InputTags from '@semcore/ui/input-tags';
<InputTags.Tag.Close />;

Inherited from the Tag.Close component.

InputTags.Tag.Circle

import InputTags from '@semcore/ui/input-tags';
<InputTags.Tag.Circle />;

Inherited from the Tag.Circle component.