> To build a Wix site agentically, or add Wix features like bookings or a store to a site you already have, follow https://www.wix.com/headless/skill.md
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Tag Component

## Article: Tag Component

## Article Link: https://dev.wix.com/docs/wix-design-system/components/form/tag-component.md

## Article Content:

# Tag

_Components/Form/Tag_

Interactive docs page: <https://wix-pages.com/design-system-documentation/#/component/tag>

## Overview

```jsx
<StorybookComponents.Stack>
  <Tag id="new-collection">New Collection</Tag>
</StorybookComponents.Stack>;
```

A tag is a label used to categorize content or display an active selection that will be applied to a product or service.

### Do

- Use it to label, categorize or organize content using descriptive keywords
- Use it to visualize selected values

### Don't

- Don't use it to display a number of items. Use `<CounterBadge/>` instead.
- Don't use it to indicate status of an item. Use `<Badge/>` instead.

### Feature examples

#### Size

Adjust the component size using \`size\` prop. It supports 4 sizes:\
 - \`large\`\
 - \`medium\`\
 - \`small\`\
 - \`tiny\`

```jsx
<StorybookComponents.Stack>
  <Tag id="size-large" size="large">Large</Tag>
  <Tag id="size-medium" size="medium">Medium</Tag>
  <Tag id="size-small" size="small">Small</Tag>
  <Tag id="size-tiny" size="tiny">Tiny</Tag>
</StorybookComponents.Stack>;
```

#### Skin

Control the skin of a component with \`skin\` prop. Is support 8 skins:\
 - \`standard\` - use it to list selected/active values\
 - \`error\` - use it to highlight an invalid value\
 - \`warning\` - use it to highlight a value that can have an unexpected impact\
 - \`dark\` - use it to show a value that represents a variable\
 - \`neutral\` - use it when the tag needs minimal emphasis\
 - \`success\` - use it to highlight confirmed values\
 - \`light\` - use it on dark backgrounds\
 - \`lightOutlined\` - use it on light backgrounds when the tag needs minimal emphasis

```jsx
<StorybookComponents.Stack flexDirection="column" gap="18px">
  <StorybookComponents.Stack>
    <Tag id="skin-standard" skin="standard">Standard</Tag>
  </StorybookComponents.Stack>
  <StorybookComponents.Stack>
    <Tag id="skin-error" skin="error">Error</Tag>
  </StorybookComponents.Stack>
  <StorybookComponents.Stack>
    <Tag id="skin-warning" skin="warning">Warning</Tag>
  </StorybookComponents.Stack>
  <StorybookComponents.Stack>
    <Tag id="skin-dark" skin="dark">Dark</Tag>
  </StorybookComponents.Stack>
  <StorybookComponents.Stack>
    <Tag id="skin-neutral" skin="neutral">Neutral</Tag>
  </StorybookComponents.Stack>
  <StorybookComponents.Stack>
    <Tag id="skin-success" skin="success">Success</Tag>
  </StorybookComponents.Stack>
  <StorybookComponents.Stack>
    <Tag id="skin-light" skin="light">Light</Tag>
  </StorybookComponents.Stack>
  <StorybookComponents.Stack>
    <Tag id="skin-lightOutlined" skin="lightOutlined">Light Outlined</Tag>
  </StorybookComponents.Stack>
</StorybookComponents.Stack>;
```

#### Disabled

Disable all interactions with \`disabled\` prop. Use it to highlight inactive values or values that can't be removed.

```jsx
<Tag id="disabled" disabled>Disabled</Tag>;
```

#### Thumbnail

Give more context about the tag with a thumbnail placed in front of the text. It usually contains `<Image/>`, `<Box/>`, icon or `<Avatar/>`.

```jsx
<Tag id="image-thumbnail" thumb={<Image src="example.jpg" />}>
  Image thumbnail
</Tag>;
```

#### Remove Button

Control whether a tag can be removed or not with \`removable\` prop.

```jsx
<StorybookComponents.Stack>
  <Tag id="removable">Removable</Tag>
  <Tag id="not-removable" removable={false}>Not removable</Tag>
</StorybookComponents.Stack>;
```

#### Max Width

Limit the width of a tag with \`maxWidth\` prop. Hover over labels that exceed the specified width to reveal the full text in a tooltip.

```jsx
<Tag id="max-width" maxWidth={240}>
  Hover to see the full label in a tooltip
</Tag>;
```

### Common use case examples

#### Content Categorization

Use tags to visualize assigned categories or labels to a product. Usually applied via multi select dropdowns or popovers.

```jsx
() => {
  const [checklistShown, setChecklistShown] = React.useState(false);
  const [tagList, setTagList] = React.useState([
    { id: 0, title: 'New collection', shown: true },
    { id: 1, title: "Women's clothing", shown: true },
    { id: 2, title: "Men's clothing", shown: false },
    { id: 3, title: 'Jacket', shown: true },
    { id: 4, title: 'Outerwear', shown: true },
    { id: 5, title: 'Sustainable', shown: false },
  ]);

  const toggleTag = (id, value) =>
    setTagList(
      tagList.map((item) =>
        item.id === id ? { ...item, shown: value } : item,
      ),
    );

  return (
    <Card>
      <Card.Content>
        <Box direction="vertical" gap="24px">
          <Box align="space-between">
            <Text weight="bold">Labels</Text>
            <Popover
              showArrow
              shown={checklistShown}
              appendTo="window"
              onClickOutside={() => setChecklistShown(false)}
            >
              <Popover.Element>
                <TextButton onClick={() => setChecklistShown(!checklistShown)}>
                  Add
                </TextButton>
              </Popover.Element>
              <Popover.Content>
                <Box direction="vertical" borderRadius="8px" padding="12px 0">
                  {tagList.map(({ id, title, shown }) => (
                    <ListItemSelect
                      checkbox
                      selected={shown}
                      title={title}
                      onClick={() => toggleTag(id, !shown)}
                    />
                  ))}
                </Box>
              </Popover.Content>
            </Popover>
          </Box>
          <Box gap="6px" flexWrap="wrap">
            {tagList.map(({ id, title, shown }) =>
              shown ? (
                <Tag id={String(id)} onRemove={() => toggleTag(id, !shown)}>
                  {title}
                </Tag>
              ) : null,
            )}
          </Box>
        </Box>
      </Card.Content>
    </Card>
  );
};
```

## Code

```jsx
import { Tag } from '@wix/design-system';
```

### Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `children` *(required)* | `ReactNode` | — | Sets the text of the tag. |
| `dataHook` | `string` | — | Applies a data-hook HTML attribute that can be used in the tests. |
| `disabled` | `boolean` | — | Specifies whether the tag should be disabled. |
| `ellipsisProps` | `EllipsisCommonProps` | — | Allows to pass common tooltip props to the tooltip that shows the full label when it's truncated. |
| `id` *(required)* | `string` | — | Assigns an unique identifier for the tag. |
| `maxWidth` | `string \| number \| string & {}` | — | Sets a maximum tag width. |
| `onClick` | `(id: string, event: MouseEvent<HTMLButtonElement, MouseEvent>) => void` | — | Defines a callback function which is called whenever a tag component is clicked. It passes the id property as the first parameter and a mouse event as second parameter. |
| `onRemove` | `(id: string) => void` | — | Defines a callback function which is called when removing the tag. It passes the id property as a parameter. |
| `removable` | `boolean` | `true` | Specifies whether the tag is removable or not. If enabled, a small clickable X icon is displayed on the right side of a component. |
| `size` | `"small" \| "tiny" \| "medium" \| "large"` | — | Controls the size of the component. |
| `skin` | `"error" \| "warning" \| "standard" \| "light" \| "neutral" \| "dark" \| "success" \| "lightOutlined"` | — | Sets the skin of the component. |
| `theme` | `"error" \| "warning" \| "standard" \| "light" \| "neutral" \| "dark" \| "success" \| "lightOutlined"` | — | Sets the skin of the component. Used only when `skin` isn't set. |
| `thumb` | `ReactElement` | — | Displays a thumbnail at the front of a tag label. Usually contain icons or `<Avatar/>`. |
| `type` | `"transparent" \| "solid" \| "outlined"` | `'solid'` | Controls the visual style of the tag: a filled background, an outline on a surface fill, or text only. |

## Testkit

Import the driver matching your test environment:

```jsx
// UniDriver
import { TagUniDriver } from '@wix/design-system/dist/testkit/unidriver';

// Vanilla
import { TagTestkit } from '@wix/design-system/dist/testkit';

// Puppeteer
import { TagTestkit } from '@wix/design-system/dist/testkit/puppeteer';

// Testing Library
import { TagTestkit } from '@wix/design-system/dist/testkit/testing-library';
```

### Driver methods

| Method | Description |
| --- | --- |
| `isTiny` | — |
| `isSmall` | — |
| `isMedium` | — |
| `isLarge` | — |
| `isStandardTheme` | — |
| `isWarningTheme` | — |
| `isErrorTheme` | — |
| `isDarkTheme` | — |
| `isSuccessTheme` | — |
| `isStandardSkin` | — |
| `isWarningSkin` | — |
| `isErrorSkin` | — |
| `isDarkSkin` | — |
| `isSuccessSkin` | — |
| `isRemovable` | — |
| `removeTag` | — |
| `click` | — |
| `isThumbExists` | — |
| `isDisabled` | — |
| `getLabel` | — |
| `getCloseButtonSkin` | — |
| `getCloseButtonTheme` | — |
| `getCloseButtonSize` | — |
| `getTextSize` | — |
| `getTextWeight` | — |
| `isClickable` | — |
| `isHoverable` | — |
| `pressKey` | — |
| `exists` | Checks whether the component found with the given data hook. |
| `element` | Gets the component root element. |
| `base` | Returns UniDriver for the base element. |

## Changelog

- **1.340.0** (2026-10-21) — maintenance release, no component-specific changes
- **1.339.0** (2026-10-19) — maintenance release, no component-specific changes
- **1.338.0** (2026-10-15) — maintenance release, no component-specific changes
- **1.332.0** (2026-10-05) — maintenance release, no component-specific changes
- **1.331.0** (2026-10-01) — maintenance release, no component-specific changes
- **1.329.0** (2026-09-24) — maintenance release, no component-specific changes
- **1.328.0** (2026-09-22) — maintenance release, no component-specific changes
- **1.327.0** (2026-09-21) — feat: add a `type` prop (`solid`, `outlined`, `transparent`) that works with every skin; `solid` is the default and keeps the current look. ([#17056](invalid-url)) — has visual changes
- **1.325.0** (2026-09-17) — maintenance release, no component-specific changes
- **1.310.0** (2026-08-10) — maintenance release, no component-specific changes
- **1.296.0** (2026-07-08) — maintenance release, no component-specific changes
- **1.292.0** (2026-06-22) — maintenance release, no component-specific changes
- **1.284.0** (2026-06-04) — maintenance release, no component-specific changes
- **1.278.0** (2026-05-08) — maintenance release, no component-specific changes
- **1.273.0** (2026-04-30) — maintenance release, no component-specific changes
- **1.272.0** (2026-04-27) — maintenance release, no component-specific changes
- **1.266.0** (2026-04-07) — maintenance release, no component-specific changes
- **1.260.0** (2026-03-17) — breaking: disabled state tokenization fix ([#15983](invalid-url))
- **1.254.0** (2026-02-03) — maintenance release, no component-specific changes
- **1.247.2** (2026-01-21) — maintenance release, no component-specific changes
- **1.244.0** (2026-01-02) — maintenance release, no component-specific changes
- **1.228.0** (2025-11-18) — maintenance release, no component-specific changes
- **1.213.0** (2025-08-19) — breaking: add tokens ([#15204](invalid-url))
- **1.212.0** (2025-08-11) — maintenance release, no component-specific changes
- **1.203.0** (2025-07-01) — maintenance release, no component-specific changes
- **1.196.0** (2025-06-04) — feat: deprecate theme prop ([#14938](invalid-url))
- **1.138.1** (2024-10-30) — maintenance release, no component-specific changes
- **1.129.1** (2024-10-01) — maintenance release, no component-specific changes
- **1.107.0** (2024-05-29) — maintenance release, no component-specific changes
- **1.102.0** (2024-04-16) — maintenance release, no component-specific changes
- **1.92.1** (2024-02-05) — maintenance release, no component-specific changes