# Copy to Clipboard

**JavaScript Function**

```
twinr_clipboard_set()
```

This function allows your webview or web app to copy custom text to the device's clipboard, which the user can then paste anywhere on their device.

***

#### Usage

```javascript
twinr_clipboard_set("Text to be copied");
```

Example

```javascript
twinr_clipboard_set("https://twinr.dev/invite-code");
```

In this example, the invite URL will be copied to the user’s clipboard when the function is called. You can trigger this function on a button click, form submission, or any custom logic.

#### Use Cases

* Copy **promo codes**, **invite links**, or **referral IDs**
* Simplify **text sharing**
* Allow users to quickly **copy support contact info**, FAQs, etc.
