# Copy

> Make text copyable with a click-to-copy button.

The `<Copy>` component makes text copyable with a single click. Use it inline to allow readers to copy version numbers, commands, API keys, or other text snippets without selecting and copying manually.

## Usage

<div>
  <div>
    Use the Fern CLI to build and consume REST APIs. The current version is <Copy>v2.0</Copy>.
  </div>
</div>

```jsx Markdown
Use the Fern CLI to build and consume REST APIs. The current version is <Copy>v2.0</Copy>.
```

## Variants

### Custom clipboard content

Use the `clipboard` prop to display one value while copying a different value to the clipboard. This is useful when you want simplify commands, versions, or URLs for readability while copying complete values.

<div>
  <div>
    Install the CLI using <Copy clipboard="npm install -g bamboo-leaf-cli">npm install</Copy>
  </div>
</div>

```jsx Markdown
Install the CLI using <Copy clipboard="npm install -g bamboo-leaf-cli">npm install</Copy>
```

## Properties

<ParamField path="children" type="string | ReactNode" required={true}>
  The text content to display and make copyable. This is what users see on the page.
</ParamField>

<ParamField path="clipboard" type="string" required={false}>
  Custom text to copy to the clipboard. Use this when you want to display one value but copy a different value.
</ParamField>