> 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: CopyClipboard Component

## Article: CopyClipboard Component

## Article Link: https://dev.wix.com/docs/wix-design-system/components/mechanisms/copy-clipboard-component.md

## Article Content:

# CopyClipboard

_Components/Mechanisms_

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

## Overview

```jsx
() => {
  return (
    <CopyClipboard value="https://www.wix-pages.com/wix-design-system-employees/">
      {({ isCopied, copyToClipboard, reset }) => (
        <Box width="260" align="space-between">
          <Text>https://www.wix-pages.com/wix-design-system-employees/</Text>
          <TextButton onClick={() => (isCopied ? reset() : copyToClipboard())}>
            {!isCopied ? 'Copy' : 'Copied!'}
          </TextButton>
        </Box>
      )}
    </CopyClipboard>
  );
};
```

CopyClipboard is a function mechanism that wraps other components to provide copy/paste functionality. Use it to copy urls, code snippets or similar.

### Do

- Use it to let users copy values they need elsewhere, such as URLs or code snippets.
- Show users that the value was copied, such as by changing the button text when isCopied is true.
- Set resetTimeout so the confirmation goes away after a short time.

### Don't

- Don't copy to the clipboard without a user action, such as on page load.
- Don't use it to display code. Use `<CodeSnippet/>`, which has its own copy action.

### Feature examples

#### Usage

Component can be used with an input with a button. Once the item is copied the interface should respond with a timeout message.

```jsx
() => {
  const [inputText, setInputText] = React.useState(
    'https://www.wix-pages.com/wix-design-system-employees/',
  );

  return (
    <CopyClipboard value={inputText} resetTimeout={1500}>
      {({ isCopied, copyToClipboard }) => (
        <Input
          readOnly
          value={inputText}
          onChange={(event) => {
            setInputText(event.target.value);
          }}
          suffix={
            <Box verticalAlign="middle" marginRight="SP1">
              <TextButton
                onClick={() => copyToClipboard()}
                size="small"
                prefixIcon={<Icons.DuplicateSmall />}
              >
                {!isCopied ? 'Copy' : 'Copied!'}
              </TextButton>
            </Box>
          }
        />
      )}
    </CopyClipboard>
  );
};
```

## Code

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

### Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `children` *(required)* | `(params: CopyClipboardChildrenProps) => ReactNode` | — | Children render prop provides handlers to invoke copying to the clipboard. |
| `className` | `string` | — |  |
| `dataHook` | `string` | — | Applied as data-hook HTML attribute that can be used in the tests. |
| `onCopy` | `() => void` | — | Defines a callback function which is called after the value is copied to the clipboard. |
| `resetTimeout` | `number` | — | Interval after which state of whether value was copied is reset. |
| `value` *(required)* | `string` | — | Text to be added to clipboard. |

## Testkit

Import the driver matching your test environment:

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

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

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

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

### Driver methods

| Method | Description |
| --- | --- |
| `exists` | Checks whether the component found with the given data hook. |
| `element` | Gets the component root element. |
| `click` | Clicks on the component root element. |
| `base` | Returns UniDriver for the base element. |

## Changelog

- **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.331.0** (2026-10-01) — maintenance release, no component-specific 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.292.0** (2026-06-22) — maintenance release, no component-specific changes
- **1.267.0** (2026-04-09) — maintenance release, no component-specific changes
- **1.266.0** (2026-04-07) — maintenance release, no component-specific changes
- **1.260.0** (2026-03-17) — maintenance release, no component-specific changes
- **1.254.0** (2026-02-03) — maintenance release, no component-specific changes
- **1.220.0** (2025-09-29) — maintenance release, no component-specific changes
- **1.160.0** (2025-02-06) — maintenance release, no component-specific changes
- **1.143.1** (2024-11-27) — maintenance release, no component-specific changes
- **1.116.0** (2024-07-22) — maintenance release, no component-specific changes
- **1.93.0** (2024-02-08) — maintenance release, no component-specific changes
- **1.92.1** (2024-02-05) — maintenance release, no component-specific changes