Tag List displays a collection of tags and supports keyboard navigation, multiple selection, and removal.

Tag removal order:

  • If there are selected tags, all of them will be removed.
  • If there are no selected tags, the focused tag will be removed.

Tags can be removed in several ways:

  • Click on the remove icon (kbqTagRemove directive) inside the tag.
  • Press Delete or Backspace key.
  • Programmatic removal through the component API.

The removal option is configured using the removable attribute (enabled by default).

Tags can be selected in several ways:

  • Click on a tag while holding Ctrl.
  • Click on a tag while holding Shift to change the selection range from the anchor tag to the clicked tag.
  • Press Shift + ← / → to expand or shrink the range.
  • Press Ctrl+A key combination.
  • Space when the tag is focused.
  • Programmatic selection through the component API.

Pointer and keyboard interactions change the same range relative to its initial tag. When the range shrinks, tags outside it are deselected. Disabled tags remain unchanged.

The selection option is configured using the selectable attribute (enabled by default).

To enable editing mode, you need to set the editable property for kbq-tag-list or individual kbq-tag.

Entering the mode:

  • By double-clicking on the tag.
  • By pressing the Enter or F2 key (when focused on the tag).

Saving changes:

  • By pressing the Enter key.
  • By clicking the confirmation button (kbqTagEditSubmit directive).

Canceling changes:

  • By pressing the Escape key.
  • When losing focus.

To enable tag reordering, you need to set the draggable property for kbq-tag-list.

Key
Action
← / → Move focus to previous/next tag.
Shift + ← / → Change the range and move focus.
Space Select/deselect tag.
Delete / Backspace Remove tag.
F2 / Enter Start editing.
Ctrl + A Select all tags.
Home / End Move focus to first/last tag.
Key
Action
Enter Save changes.
Esc Cancel changes.
Suggestions for improvement
If you found a mistake or want to improve the article, create an issue on GitHub.