Tag
The topic tag: a subject icon plus a caps label, with no container. It marks taxonomy and can link to its topic.
import { Tag } from '@fairgarden/design/feedback/tag'
Topic tags keep caps: author the label in sentence case. The icon is the tag's only color, in --role-accent; small label text never takes an accent. icon takes an inventory name or a registered subject symbol's SVG, drawn at the 20 px tag tier in currentColor. Pass href to make the tag a link: its label underlines on hover. Tags print as icon plus label.
Plain and linked
Plain and linked
Primary and secondary
Primary and secondary
secondary is the taxonomy scale and colors only the icon. primary inks the label and focus ring.
On grounds
On paper and forest
paper
Land protectionClean waterforest
Land protectionClean waterAPI Reference
A topic tag: an icon plus a caps label (type-label at weight 700,
authored in sentence case; topic tags keep caps [D160]), with no
container. Color sits on the icon only, never on the small label text.
Pass href to link it to its topic.
| Prop | Type | Description |
|---|---|---|
href | | Makes the tag a link to its topic; it renders an |
icon | | The topic’s subject symbol, Material Symbols Rounded at the tag tier
(20 px, FILL 0): an inventory name, or a registered subject symbol’s
SVG element, which the tag sizes and fills in |
primary | | Primary Radix scale: the label ink and focus ring. Never defaulted; omitted, it inherits the scope [D133]. |
secondary | | Secondary Radix scale: the taxonomy scale, which colors the icon
through |
TagProps
Props for Tag: span props, render, the link target, the icon and the color axes.
type TagProps = React.ClassAttributes<HTMLSpanElement> &
React.HTMLAttributes<HTMLSpanElement> &
__type & {
href?: string;
icon?:
| ReactElement
| 'link'
| 'menu'
| 'search'
| 'circle'
| 'arrow_forward'
| 'arrow_upward'
| 'expand_more'
| 'close'
| 'remove'
| 'add'
| 'check'
| 'chevron_right'
| 'chevron_left'
| 'more_horiz'
| 'more_vert'
| 'play_arrow'
| 'pause'
| 'download'
| 'zoom_in'
| 'zoom_out'
| 'recenter'
| 'help'
| 'mail'
| 'content_copy'
| 'open_in_new'
| 'restart_alt'
| 'description'
| 'widgets'
| 'deployed_code'
| 'format_h2'
| 'format_h3';
primary?:
| 'ruby'
| 'olive'
| 'sage'
| 'slate'
| 'sand'
| 'gray'
| 'mauve'
| 'brown'
| 'bronze'
| 'gold'
| 'red'
| 'crimson'
| 'tomato'
| 'pink'
| 'plum'
| 'indigo'
| 'iris'
| 'violet'
| 'purple'
| null;
secondary?:
| 'ruby'
| 'olive'
| 'sage'
| 'slate'
| 'sand'
| 'gray'
| 'mauve'
| 'brown'
| 'bronze'
| 'gold'
| 'red'
| 'crimson'
| 'tomato'
| 'pink'
| 'plum'
| 'indigo'
| 'iris'
| 'violet'
| 'purple'
| 'amber'
| 'blue'
| 'cyan'
| 'grass'
| 'green'
| 'jade'
| 'lime'
| 'mint'
| 'orange'
| 'sky'
| 'teal'
| 'yellow'
| null;
}Specification: DESIGN-SYSTEM.md §10.11 (badge, tag and chip) and §6.10 (subject symbols).