Tags

The Tags component provides a reusable pattern for tags in the interface.

Basic tags

Plain tags rendered as spans, prefixed with the default # character.

# Environment # Sustainability # Urban planning # Transport

Tags with links

When each tag item includes an href, the tag is rendered as a clickable anchor element.

Pill-shaped tags

Applying tagsStyle 'pill' gives each tag a rounded, pill-shaped appearance with a card background and shadow.

# Environment # Sustainability # Urban planning # Transport

Compressed tags

Setting compress to a number shows only the first N tags and hides the rest behind an expandable indicator.

# Environment # Sustainability # Urban planning ...(4)

Formatted tags

With format enabled, tag labels are lowercased and word-spacing is reduced for a compact typographic style.

# ENVIRONMENT # SUSTAINABILITY # URBAN PLANNING # TRANSPORT

Tags with colour markers

Enabling tagsMarker replaces the # prefix with a small filled circle icon coloured by each tag's color value.

Environment Transport Housing Culture

API

Parameter Default Description
default -
div
#
[] Same specification as Icon, adds an icon
false If the component should format the input text.
false Show [N] amount of items, hide the rest of them behind a expand indicator.

CSS API

Variable Default Type Values Description
var(--base) range - Main unit that drives radius and spacing scales.
var(--color--surface) color - Surface
var(--corner-shape) select square, round, squircle, circular, bevel, scoop Corner Shape
var(--color--surface-contrast) color - Used for text and icons on surface backgrounds with less contrast.
var(--shadow-color) rgba - Shadow Color
var(--shadow-amount) range - Multiplier for elevation shadows. 0 = none, 1 = default.

Similar components