Tag Input
A text field that turns each entry into a removable tag.
Installation
bash
shellui-native add tag-input
Platforms: MAUI · Avalonia. Also installs icon, wrap-layout.
Usage
Basic
Enter or a comma adds a tag; Backspace in the empty field removes the last one.
maui
avalonia
<ui:TagInput Tags="{Binding Platforms}" Placeholder="Add a platform..." /><ui:TagInput Tags="{Binding Platforms}" Placeholder="Add a platform..." />Not available on yet
MAUI and Avalonia
On Avalonia, Backspace in the empty field also removes the last tag.
API
| Property | Type | Default | Description |
|---|---|---|---|
Tags |
IList<string> (MAUI) · IList<string>? (Avalonia) |
null |
The tags. |
Placeholder |
string |
"Add tag..." |
Hint shown while empty. |
MaxTags |
int |
0 |
0 means no limit. |
AllowDuplicates |
bool |
false |
Allows the same tag more than once. |
| Event | Arguments | Description |
|---|---|---|
TagsChanged |
IReadOnlyList<string> |
User input only: setting Tags, or calling Add / Remove, from code doesn't raise it. |
| Method | Description |
|---|---|
Add(string tag) |
Adds a tag, as typing it and pressing Enter would. |
Remove(string tag) |
Removes a tag. |