Skip to content
Tauri

Clipboard

Read and write to the system clipboard using the clipboard plugin.

Install the clipboard plugin to get started.

Use your project’s package manager to add the dependency:

npm run tauri add clipboard-manager

The clipboard plugin is available in both JavaScript and Rust.

import { writeText, readText } from '@tauri-apps/plugin-clipboard-manager';
// Write content to clipboard
await writeText('Tauri is awesome!');
// Read content from clipboard
const content = await readText();
console.log(content);
// Prints "Tauri is awesome!" to the console

© 2024 Tauri Contributors. CC-BY / MIT