Tag Input

The ArcadiaTagInput component accepts a list of string tags. Users can add tags by typing and pressing Enter or comma, and remove tags with the X button or Backspace.

Basic Usage

<ArcadiaTagInput @bind-Tags="tags" Placeholder="Add tags..." />

<ArcadiaTagInput @bind-Tags="skills"
                 MaxTags="5"
                 AllowDuplicates="false"
                 OnTagAdded="HandleAdded"
                 OnTagRemoved="HandleRemoved" />

Parameters

ParameterTypeDefaultDescription
TagsList<string>new()The list of tags. Supports two-way binding.
Placeholderstring"Add tag..."Placeholder text for the input.
MaxTagsint0Maximum number of tags allowed. 0 means unlimited.
AllowDuplicatesboolfalseWhether duplicate tags are allowed.
DisabledboolfalseWhether the tag input is disabled.
Classstring?nullAdditional CSS class names.
Stylestring?nullInline CSS styles.

Events

EventTypeDescription
TagsChangedEventCallback<List<string>>Fired when the tags list changes.
OnTagAddedEventCallback<string>Fired when a tag is added.
OnTagRemovedEventCallback<string>Fired when a tag is removed.

Accessibility

  • The input has aria-label matching the placeholder.
  • Each tag’s remove button has aria-label="Remove {tag name}".
  • Keyboard: Enter or comma adds a tag, Backspace (when input empty) removes the last tag.
  • Remove icon SVGs are marked aria-hidden="true".