# Tag

Page: /docs/components/tag

{/* Figma: Meridian → Tag (docs 36:12, component set 17:7872). Spec: docs/design-system/meridian/tag.md */}

A value chip: something chosen or applied, like a country in a Multi-select or a filter on the guides library. Two sizes, sm 20 and md 24, with radius 4. Tags are values, not statuses (Badge) and not filters you open (Pill).

```tsx
import { Tag } from "@commenda/meridian/ui/tag";
import { USFlag } from "@commenda/pathfinder/flags";
import type { ReactNode } from "react";

function Stage({ children }: { children: ReactNode }) {
	return (
		<div className="not-prose my-4 flex flex-wrap items-end gap-6 rounded-xl border border-fd-border bg-white p-8">
			{children}
		</div>
	);
}

function Labelled({ label, children }: { label: string; children: ReactNode }) {
	return (
		<div className="flex flex-col items-center gap-2.5">
			{children}
			<span className="text-[12px] text-fd-muted-foreground">{label}</span>
		</div>
	);
}

const noop = () => {};

const remove = { onRemove: noop };

export function TagSizes() {
	return (
		<Stage>
			<Labelled label="sm · 20">
				<Tag label="United States" leadingIcon={<USFlag size={12} />} removeConfig={remove} />
			</Labelled>
			<Labelled label="md · 24">
				<Tag
					size="md"
					label="United States"
					leadingIcon={<USFlag size={12} />}
					removeConfig={remove}
				/>
			</Labelled>
		</Stage>
	);
}
```

## Usage [#usage]

```tsx
import { Tag } from "@commenda/meridian/ui/tag";
import { USFlag } from "@commenda/pathfinder/flags";

<Tag label="United States" leadingIcon={<USFlag size={12} />} removeConfig={{ onRemove }} />;
```

## Sizes [#sizes]

sm 20 sits inside a 40 field and in dense lists. md 24 stands on its own, like filter chips above a list of guides.

```tsx
import { Tag } from "@commenda/meridian/ui/tag";
import { USFlag } from "@commenda/pathfinder/flags";
import type { ReactNode } from "react";

function Stage({ children }: { children: ReactNode }) {
	return (
		<div className="not-prose my-4 flex flex-wrap items-end gap-6 rounded-xl border border-fd-border bg-white p-8">
			{children}
		</div>
	);
}

function Labelled({ label, children }: { label: string; children: ReactNode }) {
	return (
		<div className="flex flex-col items-center gap-2.5">
			{children}
			<span className="text-[12px] text-fd-muted-foreground">{label}</span>
		</div>
	);
}

const noop = () => {};

const remove = { onRemove: noop };

export function TagSizes() {
	return (
		<Stage>
			<Labelled label="sm · 20">
				<Tag label="United States" leadingIcon={<USFlag size={12} />} removeConfig={remove} />
			</Labelled>
			<Labelled label="md · 24">
				<Tag
					size="md"
					label="United States"
					leadingIcon={<USFlag size={12} />}
					removeConfig={remove}
				/>
			</Labelled>
		</Stage>
	);
}
```

## Removable or fixed [#removable-or-fixed]

x removes the value. Turn it off where the value cannot be removed here, and for the +N count.

```tsx
import { Tag } from "@commenda/meridian/ui/tag";
import { DEFlag, USFlag } from "@commenda/pathfinder/flags";
import type { ReactNode } from "react";

function Stage({ children }: { children: ReactNode }) {
	return (
		<div className="not-prose my-4 flex flex-wrap items-end gap-6 rounded-xl border border-fd-border bg-white p-8">
			{children}
		</div>
	);
}

const noop = () => {};

const remove = { onRemove: noop };

export function TagRemovable() {
	return (
		<Stage>
			<Tag label="United States" leadingIcon={<USFlag size={12} />} removeConfig={remove} />
			<Tag label="Germany" leadingIcon={<DEFlag size={12} />} removeConfig={remove} />
			<Tag label="Sales tax" />
			<Tag label="+3" />
		</Stage>
	);
}
```

## Leading flag or icon [#leading-flag-or-icon]

Countries and jurisdictions always lead with their 12 flag. A 12 icon is for other kinds of things, like a product or a topic.

```tsx
import { Tag } from "@commenda/meridian/ui/tag";
import { GBFlag, INFlag, SGFlag } from "@commenda/pathfinder/flags";
import { Globe02Icon } from "@commenda/pathfinder/icons/Globe02Icon";
import type { ReactNode } from "react";

function Stage({ children }: { children: ReactNode }) {
	return (
		<div className="not-prose my-4 flex flex-wrap items-end gap-6 rounded-xl border border-fd-border bg-white p-8">
			{children}
		</div>
	);
}

const noop = () => {};

const remove = { onRemove: noop };

export function TagLeading() {
	return (
		<Stage>
			<Tag label="United Kingdom" leadingIcon={<GBFlag size={12} />} removeConfig={remove} />
			<Tag label="India" leadingIcon={<INFlag size={12} />} removeConfig={remove} />
			<Tag label="Singapore" leadingIcon={<SGFlag size={12} />} />
			<Tag label="Transfer pricing" leadingIcon={<Globe02Icon size={12} />} removeConfig={remove} />
		</Stage>
	);
}
```

## Tones and states [#tones-and-states]

Neutral for values people chose. Blue marks an applied filter, so people can see what is narrowing the list. Hover darkens one step. Disabled follows the field it sits in.

```tsx
import { Tag } from "@commenda/meridian/ui/tag";
import { CAFlag } from "@commenda/pathfinder/flags";
import type { ReactNode } from "react";

function Stage({ children }: { children: ReactNode }) {
	return (
		<div className="not-prose my-4 flex flex-wrap items-end gap-6 rounded-xl border border-fd-border bg-white p-8">
			{children}
		</div>
	);
}

function Labelled({ label, children }: { label: string; children: ReactNode }) {
	return (
		<div className="flex flex-col items-center gap-2.5">
			{children}
			<span className="text-[12px] text-fd-muted-foreground">{label}</span>
		</div>
	);
}

const noop = () => {};

const remove = { onRemove: noop };

export function TagTones() {
	return (
		<Stage>
			<Labelled label="neutral">
				<Tag label="Sales tax" removeConfig={remove} />
			</Labelled>
			<Labelled label="blue">
				<Tag tone="blue" label="Sales tax" removeConfig={remove} />
			</Labelled>
			<Labelled label="disabled">
				<Tag
					label="Canada"
					leadingIcon={<CAFlag size={12} />}
					removeConfig={{ onRemove: noop, isDisabled: true }}
				/>
			</Labelled>
		</Stage>
	);
}
```

## Anatomy [#anatomy]

Soft Pearl 200 fill with a 0.5 hairline, radius 4, 6 on the left and 4 on the right, 4 between parts. sm: 20 high, Label/12 in Soft Pearl 1000, x 12 in Soft Pearl 800. md: 24 high, Label/13.

## API reference [#api-reference]

| Prop | Type | Description |
| --- | --- | --- |
| `label` (required) | `string` |  |
| `size` | `"md" \| "sm"` | Figma `size`: sm 20 inside fields and dense lists, md 24 standing on its own. |
| `tone` | `"neutral" \| "blue"` |  |
| `leadingIcon` | `ReactElement<unknown, string \| JSXElementConstructor<any>>` |  |
| `removeConfig` | `{ onRemove: () => void; label?: string; isDisabled?: boolean; }` |  |
| `className` | `string` |  |
| `id` | `string` |  |

**`removeConfig` fields**

| Field | Type | Description |
| --- | --- | --- |
| `onRemove` (required) | `() => void` |  |
| `label` | `string` |  |
| `isDisabled` | `boolean` |  |

## Best practices [#best-practices]

- Use Tag for values someone chose or applied: countries in a Multi-select, filters on the guides library, topics on a post.
- A status (Live, New, Coming soon) is a Badge, not a Tag. Badges are read-only, colored by meaning and never removable. A filter people open is a Pill.
- Keep labels short. A Tag never wraps. Long names truncate with an ellipsis and show in full on hover.
- x removes the value at once. On a filter row, offer Clear all at the end.
- Countries always lead with their flag, and so do jurisdictions. Icons are for other kinds of things.
- Source: Pathfinder Tag. Meridian adds size md 24 beside Pathfinder’s 20, now sm.
