Tag
Design system utility for taxonomy/filter tag styling. Exports tagVariants for consistent pill-style tags across content taxonomies, list filters, and search chips.
Exported Utilities
tagVariants
Function to generate tag class names without rendering:
import { tagVariants } from '@/components/atoms/Tag';
// Interactive (clickable) tag
const linkClassName = tagVariants({ variant: 'taxonomyTag', interactive: true });
// Non-interactive (display only) tag
const spanClassName = tagVariants({ variant: 'taxonomyTag', interactive: false });
// With additional classes
const className = tagVariants({ variant: 'taxonomyTag', className: 'no-underline' });Variants
| Variant | Description |
|---|---|
'taxonomyTag' | Pill-style outline tag with light border, subtle text, hover states |
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
variant | TagVariant | 'taxonomyTag' | Tag style variant |
interactive | boolean | true | Adds cursor-pointer when true, cursor-default when false |
className | string | - | Additional CSS classes |
Usage
Used by:
ListFilters– filter chips in List organismContentTaxonomies– subject/technology tags on content pagesTaxonomyTags– viatagClassNamepropTechnologyTags– technology term pills with icons
Notes
- Base style: rounded border, light text, transparent background, hover darkening
- Includes
inline-flex items-center gap-2for icon + label layout - Use with
Link,a, orspandepending on interactivity