current theme: placeholder

component :: Tags

The .tags component styles a list of tags. It supports both list and inline layouts, is accessible by default, and customizable via CSS custom properties.

File NameclassSource
component.tags.css.tagsGithub

HTML

Custom properties

The following custom properties are available in the default theme:

PropertyDescription
--tags-paddingTag padding.
--tags-font-sizeTag font size.
--tags-colorTag text color.
--tags-background-colorTag background color.
--tags-background-color-hoverTag hover background color.
--tags-radiusTag border radius.

Available modifiers

ModifierDescription
.tagsDefault style (list layout).
.tags-inlineInline layout using flex.

Astro component

PropTypeDefaultDescription
tagListstring[][]Array of tag strings to display.
variantstringinlineInline or list layout.
urlstring/tagsBase URL to prepend to each tag.
extraClassstringundefinedAdditional CSS, useful for helper classes.
ariaLabelstring'Tags'Accessible label for the tag list.
data-testidstring'tags'Test ID for testing purposes.

Examples