Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Demonstrates clipboard read/write using the Tauri Clipboard API.
// main.js
import { writeText, readText } from '@tauri-apps/api/clipboard';
document.getElementById('copyBtn').addEventListener('click', async () => {
await writeText(document.getElementById('inputText').value);
alert('Copied to clipboard!');
});
document.getElementById('pasteBtn').addEventListener('click', async () => {
const text = await readText();
document.getElementById('output').textContent = text;
});
// index.html
<!DOCTYPE html>
<html>
<body>
<h2>Clipboard Manager</h2>
<input id='inputText' placeholder='Text to copy'>
<button id='copyBtn'>Copy</button>
<button id='pasteBtn'>Paste</button>
<p id='output'></p>
<script type='module' src='main.js'></script>
</body>
</html>Tauri is an open-source framework for building tiny, secure, and fast desktop applications using web technologies (HTML, CSS, JS) while leveraging Rust for backend functionality. It works with frontend frameworks like React, Vue, Angular, and Svelte.
Origin & Creator
Created by the Tauri Programme within the open-source community starting in 2019, Tauri was designed to offer lightweight, secure alternatives to Electron apps.
Industrial Note
Best suited for desktop apps that require small binary sizes, high performance, and strong security guarantees while reusing web development skills.