Tag Component
Sizes
Three sizes
Small
Medium
Large
razor
<Tag Text="Small" Size="sm" />
<Tag Text="Medium" Size="md" />
<Tag Text="Large" Size="lg" />With close button
Removable tags
Removable
Removable
Removable
razor
<Tag Text="Removable" Size="md" ShowClose="true" />With count
Numeric badge
Design3
Development12
Marketing99
razor
<Tag Text="Design" Size="md" ShowCount="true" Count="12" />With dot
Status indicator prefix
Active
Active
Active
razor
<Tag Text="Active" Size="md" ShowDot="true" />With avatar
Person-tagging pattern
razor
<Tag Text="Olivia Rhye"
Size="md"
ShowAvatar="true"
AvatarUrl="https://example.com/olivia.jpg" />With checkbox
Selectable tags
Design
Development
Marketing
razor
<Tag Text="Design" Size="md" ShowCheckbox="true" />
<Tag Text="Development" Size="md" ShowCheckbox="true" Checked="true" />Combined variants
Mix affordances on one tag
razor
<Tag Text="Olivia Rhye" Size="md"
ShowAvatar="true" AvatarUrl="/olivia.jpg"
ShowClose="true" />
<Tag Text="Design" Size="md"
ShowDot="true"
ShowCount="true" Count="5" />
<Tag Text="Active" Size="md"
ShowCheckbox="true" Checked="true"
ShowClose="true" />Interactive (removable)
Click X to remove
DesignDevelopmentMarketingProductEngineering
razor
@foreach (var tag in tags)
{
<Tag Text="@tag" Size="md" ShowClose="true"
OnClose="() => RemoveTag(tag)" />
}
@code {
private List<string> tags = ["Design", "Development", "Marketing"];
private void RemoveTag(string tag) => tags.Remove(tag);
}