Tag
The Tag component is a small label to insert anywhere.
How it works #
The Tag component is a small, flexible label used to highlight information, categorize content, or display status indicators in your Blazor application.
How to use:
This demo shows the simplest usage of the
How to use:
- Add the
Tagcomponent to your page wherever you want to display a label. - Set the tag's content by placing text or markup between the opening and closing
<Tag>tags. - Optionally, customize the tag using parameters such as
Color,Size,IsRounded, and more.
Tag component with default settings.
Tag label
<Tag>Tag label</Tag>Colors #
The Tag component supports a variety of color options to match your application's theme or to convey meaning (such as status or category).
How to use:
This demo displays tags with various color options.
How to use:
- Set the
Colorparameter to one of the predefinedTagColorvalues (e.g.,Primary,Info,Success, etc.). - Use different colors to visually distinguish tags for different purposes.
Black
Dark
Light
White
Primary
Link
Info
Success
Warning
Danger
<Tag Color="TagColor.Black">Black</Tag>
<Tag Color="TagColor.Dark">Dark</Tag>
<Tag Color="TagColor.Light">Light</Tag>
<Tag Color="TagColor.White">White</Tag>
<Tag Color="TagColor.Primary">Primary</Tag>
<Tag Color="TagColor.Link">Link</Tag>
<Tag Color="TagColor.Info">Info</Tag>
<Tag Color="TagColor.Success">Success</Tag>
<Tag Color="TagColor.Warning">Warning</Tag>
<Tag Color="TagColor.Danger">Danger</Tag>
You can also display a lighter version of each color by setting the
How to use:
This demo shows tags using the light color variants.
ShowLightVersion parameter to true.
How to use:
- Set both the
ColorandShowLightVersion="true"parameters on theTagcomponent. - Use light tags for subtle emphasis or to reduce visual weight.
Primary
Link
Info
Success
Warning
Danger
<Tag Color="TagColor.Primary" ShowLightVersion="true">Primary</Tag>
<Tag Color="TagColor.Link" ShowLightVersion="true">Link</Tag>
<Tag Color="TagColor.Info" ShowLightVersion="true">Info</Tag>
<Tag Color="TagColor.Success" ShowLightVersion="true">Success</Tag>
<Tag Color="TagColor.Warning" ShowLightVersion="true">Warning</Tag>
<Tag Color="TagColor.Danger" ShowLightVersion="true">Danger</Tag>Sizes #
The Tag component supports multiple sizes to fit different UI needs.
How to use:
This demo shows individual tags with different sizes.
How to use:
- Set the
Sizeparameter toTagSize.Normal,TagSize.Medium, orTagSize.Largeto adjust the tag's size. - Choose a size that best fits your layout and content.
Normal
Medium
Large
<Tag Color="TagColor.Primary" Size="TagSize.Normal">Normal</Tag>
<Tag Color="TagColor.Link" Size="TagSize.Medium">Medium</Tag>
<Tag Color="TagColor.Info" Size="TagSize.Large">Large</Tag>
You can apply a size to a group of tags by setting the
How to use:
This demo shows a group of medium-sized tags.
Size parameter on the Tags container. All child tags will inherit this size unless overridden.
How to use:
- Wrap multiple
Tagcomponents in aTagscontainer. - Set the
Sizeparameter on theTagscontainer to apply the size to all child tags.
Black
Dark
Light
White
Primary
Link
Info
Success
Warning
Danger
<Tags Size="TagSize.Medium">
<Tag Color="TagColor.Black">Black</Tag>
<Tag Color="TagColor.Dark">Dark</Tag>
<Tag Color="TagColor.Light">Light</Tag>
<Tag Color="TagColor.White">White</Tag>
<Tag Color="TagColor.Primary">Primary</Tag>
<Tag Color="TagColor.Link">Link</Tag>
<Tag Color="TagColor.Info">Info</Tag>
<Tag Color="TagColor.Success">Success</Tag>
<Tag Color="TagColor.Warning">Warning</Tag>
<Tag Color="TagColor.Danger">Danger</Tag>
</Tags>
This example demonstrates a group of large tags using the
How to use:
Useful for prominent labels or headers.
Tags container with Size="TagSize.Large".
How to use:
- Use the
Tagscontainer and setSize="TagSize.Large"to make all tags large.
Black
Dark
Light
White
Primary
Link
Info
Success
Warning
Danger
<Tags Size="TagSize.Large">
<Tag Color="TagColor.Black">Black</Tag>
<Tag Color="TagColor.Dark">Dark</Tag>
<Tag Color="TagColor.Light">Light</Tag>
<Tag Color="TagColor.White">White</Tag>
<Tag Color="TagColor.Primary">Primary</Tag>
<Tag Color="TagColor.Link">Link</Tag>
<Tag Color="TagColor.Info">Info</Tag>
<Tag Color="TagColor.Success">Success</Tag>
<Tag Color="TagColor.Warning">Warning</Tag>
<Tag Color="TagColor.Danger">Danger</Tag>
</Tags>
You can mix tag sizes within a group by setting the
How to use:
This demo shows a group of medium tags with some tags using the normal size.
Size parameter on individual Tag components, even if the Tags container has a default size.
How to use:
- Set a default
Sizeon theTagscontainer. - Override the size for specific
Tagcomponents as needed.
Black
Dark
Primary
Link
Info
Success
Warning
Danger
<Tags Size="TagSize.Medium">
<Tag Color="TagColor.Black">Black</Tag>
<Tag Color="TagColor.Dark" Size="TagSize.Normal">Dark</Tag>
<Tag Color="TagColor.Primary">Primary</Tag>
<Tag Color="TagColor.Link" Size="TagSize.Normal">Link</Tag>
<Tag Color="TagColor.Info">Info</Tag>
<Tag Color="TagColor.Success" Size="TagSize.Normal">Success</Tag>
<Tag Color="TagColor.Warning">Warning</Tag>
<Tag Color="TagColor.Danger" Size="TagSize.Normal">Danger</Tag>
</Tags>Rounded #
The Tag component can be displayed with rounded corners for a softer appearance.
How to use:
This demo shows tags with the
How to use:
- Set the
IsRoundedparameter totrueon theTagcomponent.
IsRounded option enabled.
Black
Dark
Light
White
Primary
Link
Info
Success
Warning
Danger
<Tag Color="TagColor.Black" IsRounded="true">Black</Tag>
<Tag Color="TagColor.Dark" IsRounded="true">Dark</Tag>
<Tag Color="TagColor.Light" IsRounded="true">Light</Tag>
<Tag Color="TagColor.White" IsRounded="true">White</Tag>
<Tag Color="TagColor.Primary" IsRounded="true">Primary</Tag>
<Tag Color="TagColor.Link" IsRounded="true">Link</Tag>
<Tag Color="TagColor.Info" IsRounded="true">Info</Tag>
<Tag Color="TagColor.Success" IsRounded="true">Success</Tag>
<Tag Color="TagColor.Warning" IsRounded="true">Warning</Tag>
<Tag Color="TagColor.Danger" IsRounded="true">Danger</Tag>Hover state #
The Tag component supports a hover state, allowing you to highlight tags when users move their cursor over them.
How to use:
This demo shows tags that visually respond to mouse hover.
How to use:
- Set the
IsHoverableparameter totrueon theTagcomponent.
Black
Dark
Light
White
Primary
Link
Info
Success
Warning
Danger
<Tag Color="TagColor.Black" IsHoverable="true">Black</Tag>
<Tag Color="TagColor.Dark" IsHoverable="true">Dark</Tag>
<Tag Color="TagColor.Light" IsHoverable="true">Light</Tag>
<Tag Color="TagColor.White" IsHoverable="true">White</Tag>
<Tag Color="TagColor.Primary" IsHoverable="true">Primary</Tag>
<Tag Color="TagColor.Link" IsHoverable="true">Link</Tag>
<Tag Color="TagColor.Info" IsHoverable="true">Info</Tag>
<Tag Color="TagColor.Success" IsHoverable="true">Success</Tag>
<Tag Color="TagColor.Warning" IsHoverable="true">Warning</Tag>
<Tag Color="TagColor.Danger" IsHoverable="true">Danger</Tag>Delete #
The Tag component can be used as a delete button, providing a small, clickable "X" for removing items or tags.
How to use:
This demo shows delete tags in various colors.
How to use:
- Set the
IsDeleteparameter totrueon theTagcomponent. - Optionally, combine with
ColorandIsHoverablefor additional styling and interactivity.
<Tag Color="TagColor.Black" IsHoverable="true" IsDelete="true" />
<Tag Color="TagColor.Dark" IsHoverable="true" IsDelete="true" />
<Tag Color="TagColor.Light" IsHoverable="true" IsDelete="true" />
<Tag Color="TagColor.White" IsHoverable="true" IsDelete="true" />
<Tag Color="TagColor.Primary" IsHoverable="true" IsDelete="true" />
<Tag Color="TagColor.Link" IsHoverable="true" IsDelete="true" />
<Tag Color="TagColor.Info" IsHoverable="true" IsDelete="true" />
<Tag Color="TagColor.Success" IsHoverable="true" IsDelete="true" />
<Tag Color="TagColor.Warning" IsHoverable="true" IsDelete="true" />
<Tag Color="TagColor.Danger" IsHoverable="true" IsDelete="true" />
You can also create rounded delete tags by combining
How to use:
This demo shows rounded delete tags.
IsDelete="true" and IsRounded="true".
How to use:
- Set both
IsDelete="true"andIsRounded="true"on theTagcomponent.
<Tag Color="TagColor.Black" IsHoverable="true" IsDelete="true" IsRounded="true" />
<Tag Color="TagColor.Dark" IsHoverable="true" IsDelete="true" IsRounded="true" />
<Tag Color="TagColor.Light" IsHoverable="true" IsDelete="true" IsRounded="true" />
<Tag Color="TagColor.White" IsHoverable="true" IsDelete="true" IsRounded="true" />
<Tag Color="TagColor.Primary" IsHoverable="true" IsDelete="true" IsRounded="true" />
<Tag Color="TagColor.Link" IsHoverable="true" IsDelete="true" IsRounded="true" />
<Tag Color="TagColor.Info" IsHoverable="true" IsDelete="true" IsRounded="true" />
<Tag Color="TagColor.Success" IsHoverable="true" IsDelete="true" IsRounded="true" />
<Tag Color="TagColor.Warning" IsHoverable="true" IsDelete="true" IsRounded="true" />
<Tag Color="TagColor.Danger" IsHoverable="true" IsDelete="true" IsRounded="true" />List of tags #
The Tags container allows you to display a list or group of tags together, making it easy to present related labels in a compact format.
How to use:
This demo shows a small group of tags.
How to use:
- Wrap multiple
Tagcomponents inside aTagscontainer.
One
Two
Three
<Tags>
<Tag>One</Tag>
<Tag>Two</Tag>
<Tag>Three</Tag>
</Tags>
You can display a larger set of tags by adding more
How to use:
This demo shows a long list of tags.
Tag components inside the Tags container.
How to use:
- Add as many
Tagcomponents as needed within theTagscontainer to represent your data.
One
Two
Three
Four
Five
Six
Seven
Eight
Nine
Ten
Eleven
Twelve
Thirteen
Fourteen
Fifteen
Sixteen
Seventeen
Eighteen
Nineteen
Twenty
<Tags>
<Tag>One</Tag>
<Tag>Two</Tag>
<Tag>Three</Tag>
<Tag>Four</Tag>
<Tag>Five</Tag>
<Tag>Six</Tag>
<Tag>Seven</Tag>
<Tag>Eight</Tag>
<Tag>Nine</Tag>
<Tag>Ten</Tag>
<Tag>Eleven</Tag>
<Tag>Twelve</Tag>
<Tag>Thirteen</Tag>
<Tag>Fourteen</Tag>
<Tag>Fifteen</Tag>
<Tag>Sixteen</Tag>
<Tag>Seventeen</Tag>
<Tag>Eighteen</Tag>
<Tag>Nineteen</Tag>
<Tag>Twenty</Tag>
</Tags>Addon tags #
The AddonTags container allows you to group two or more tags together as a single visual unit, often used to display related information side by side.
How to use:
This demo shows how to group tags as addons.
How to use:
- Wrap two or more
Tagcomponents inside anAddonTagscontainer. - Use different
Colorvalues to distinguish each tag within the group.
Package
BlazorExpress.Bulma
nuget
v1.0.0
build
passing
<AddonTags>
<Tag>Package</Tag>
<Tag Color="TagColor.Primary">BlazorExpress.Bulma</Tag>
</AddonTags>
<AddonTags>
<Tag Color="TagColor.Dark">nuget</Tag>
<Tag Color="TagColor.Info">v1.0.0</Tag>
</AddonTags>
<AddonTags>
<Tag Color="TagColor.Dark">build</Tag>
<Tag Color="TagColor.Success">passing</Tag>
</AddonTags>
You can also include a delete tag within an
How to use:
This demo shows an addon group with a delete tag.
AddonTags group to allow users to remove the entire group or a specific tag.
How to use:
- Add a
TagwithIsDelete="true"inside theAddonTagscontainer.
Package
<AddonTags>
<Tag Color="TagColor.Danger">Package</Tag>
<Tag IsDelete="true" />
</AddonTags>Grouped addon tags #
The GroupedAddonTags container allows you to display multiple
How to use:
This demo shows multiple addon tag groups, each representing related information.
AddonTags groups together, making it easy to present sets of related tag pairs or triplets in a structured layout.
How to use:
- Wrap several
AddonTagsgroups inside aGroupedAddonTagscontainer. - Each
AddonTagsgroup can contain two or moreTagcomponents, styled as needed.
Package
BlazorExpress.Bulma
nuget
v1.0.0
build
passing
<GroupedAddonTags>
<AddonTags>
<Tag>Package</Tag>
<Tag Color="TagColor.Primary">BlazorExpress.Bulma</Tag>
</AddonTags>
<AddonTags>
<Tag Color="TagColor.Dark">nuget</Tag>
<Tag Color="TagColor.Info">v1.0.0</Tag>
</AddonTags>
<AddonTags>
<Tag Color="TagColor.Dark">build</Tag>
<Tag Color="TagColor.Success">passing</Tag>
</AddonTags>
</GroupedAddonTags>
You can also include delete tags within each
How to use:
This demo shows grouped addon tags with delete buttons for each group.
AddonTags group inside a GroupedAddonTags container, allowing users to remove individual tag groups.
How to use:
- For each
AddonTagsgroup, add aTagwithIsDelete="true"to provide a delete action for that group.
Technology
Blazor
Web
Open Source
Community
Demo
<GroupedAddonTags>
<AddonTags>
<Tag Color="TagColor.Link">Technology</Tag>
<Tag IsDelete="true" />
</AddonTags>
<AddonTags>
<Tag Color="TagColor.Link">Blazor</Tag>
<Tag IsDelete="true" />
</AddonTags>
<AddonTags>
<Tag Color="TagColor.Link">Web</Tag>
<Tag IsDelete="true" />
</AddonTags>
<AddonTags>
<Tag Color="TagColor.Link">Open Source</Tag>
<Tag IsDelete="true" />
</AddonTags>
<AddonTags>
<Tag Color="TagColor.Link">Community</Tag>
<Tag IsDelete="true" />
</AddonTags>
<AddonTags>
<Tag Color="TagColor.Link">Demo</Tag>
<Tag IsDelete="true" />
</AddonTags>
</GroupedAddonTags>