Live demo
Demo source
Use a tag to categorise content with short metadata, such as "Draft", "Internal" or "Energy". A tag can be static, link to a related page, or stand for a filter that people remove. Tags have no selected state. Use a status indicator for system or review states, and a pill for selectable filters.
Anatomy
An orange tag reading Label with four callouts: 1 marks the container, 2 the bookmark icon at the start, 3 the label, and 4 the remove icon at the end.
- Container takes its colour from
color. Withhref, the icon and label area becomes a link; the remove button remains a separate action. - Leading icon (optional) goes in the
leading-iconslot. - Label holds the text, from
label. It also names the remove button. - Remove button (optional,
dismissible) emitsdismissed. The tag stays on the page until your application removes it.
Interaction and states
Use a static tag for metadata, href for navigation to a category, or
dismissible for an active filter that can be removed. The remove button's
square target occupies the trailing end of the tag and has default, hover,
focus and disabled states. Keep its keyboard focus indicator visible.
disabled only disables removal; it does not disable an href link. Handle
dismissed by removing the corresponding filter from application state.
Tags do not have selected or active toggle states.
Colours and content
color takes one of ten category colours: grey (the default), blue,
green, turquoise, lime, yellow, amber, orange, red and
crimson. Use colours consistently for the same category, and keep the label
visible, because colour alone doesn't carry the meaning. Tags come in one
size, and the icon is always extra small.
- Use one or two words in sentence case.
- Don't use a tag for counts or a status that changes.
disabledonly turns off the remove button; the label stays readable.
Use a dedicated counter for unread totals or numeric indicators on icons, and a status indicator for results such as “Validated”. A category label can link to filtered content, but a control that toggles a filter belongs in a pill.