Tags are used within the Tag list component in input fields to represent selected values: Select Multiple, Tag autocomplete, Tag input.
Tags are most commonly used with a “Remove” button to allow users to delete a selected value from an input field. In some cases, tag removal should be disabled—when that’s the case, the close (×) icon should be hidden.
Tag text does not wrap to a new line; instead, it is truncated with an ellipsis.
Tags can be removed in several ways:
kbqTagRemove directive) inside the tag.Delete or Backspace key.The removal option is configured using the removable attribute (enabled by default).
Tags can be selected in several ways:
Space when the tag is focused.The selection option is configured using the selectable attribute (enabled by default).
To enable editing mode, set the editable property for kbq-tag.
Entering edit mode:
Enter or F2 key (when the tag is focused).Saving changes:
Enter key.kbqTagEditSubmit directive).Canceling changes:
Escape key.Do not use tag editing when complex validation is expected. Editing is configured so that it's impossible to save a tag with an invalid value. To prevent saving, use the preventEditSubmit attribute.
Use a Badge if you need a colored label in a table or key-value list. Tags should be used exclusively as tokens within input controls.
Key |
Action |
|---|---|
| Space | Select/deselect tag. |
| Delete / Backspace | Remove tag. |
| F2 / Enter | Start editing. |
| Ctrl + A | Select all tags. |
Key |
Action |
|---|---|
| Enter | Save changes. |
| Esc | Cancel changes. |