---
description: Use clipboard to copy and paste content between pages or apps
---

# Clipboard

The Clipboard API enables copy and pasting to/from the clipboard. On iOS this API also allows copying images and URLs.

Clipboard function is implemented using Capacitor's default Clipboard API

```
import { Plugins } from '@capacitor/core';

const { Clipboard } = Plugins;

Clipboard.write({
  string: "Hello, Moto"
});

let str = await Clipboard.read({
  type: "string"
});
console.log('Got string from clipboard:', str.value);
```

### Features

Using Clipboard page functions, you can

* Copy text written in a read-only format (e.g. a key or password)
* Copy text written in an editable text-box (e.g. something you have entered as a user)
* Paste text using a button OR paste using long-press action of the device

![](https://3608702775-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LsQWILyBp_9nWmIJ7TG%2F-LugdXhFd7i_1US8NZ5M%2F-LugeN2Pc4tfO1dR2JcX%2Flocalhost_8100_\(iPhone%206_7_8\).png?alt=media\&token=bba31e2e-445d-454b-8b71-b752dc2abe76)

### Methods

It has three methods

* read() - Reads the data from Clipboard
* write() - Writes selected data to Clipboard
* addListener() - Listens to Read or Write event from Clipboard

### &#x20;<a href="#example" id="example"></a>
