Clipboard API Playground

The clipboard is the class’s shared locker: press Salin and writeText, write() with a ClipboardItem or the old execCommand really runs on your click, then…

Why it matters

A "Copy" button is everywhere: invite links, code, account numbers. Knowing its conditions (a secure context, activation from a click, read permission) makes your button work in every browser instead of failing silently.

The key idea

The modern clipboard is async, and needs a secure page and a warm click

Common mistakes

Try it in this playground