Web Features
Clipboard

Clipboard API Demo

The Clipboard API allows developers to copy and paste text to the user's clipboard with a single line of code.

Clipboard Logo

Demo

  1. Install this website as a PWA on your device (optional).
  2. Tap the buttons below to see the Clipboard API in action.
  3. Scroll down to inspect the code of the demo.

Browser support

The Clipboard API simplifies copy-and-paste interactions by providing a direct, asynchronous JavaScript interface for reading and writing clipboard data, eliminating the need for older, hacky workarounds like hidden input elements or execCommand. The Clipboard API has been supported in all modern browsers since 2021.

API

navigator.clipboard.writeText()
navigator.clipboard.readText()

Code

Links & Documentation

Your app here

Ready to generate your PWA?

Try our PWA toolkit free of charge and without limits for 14 days. No credit card required.

Generate PWA See plans