For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/en/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/en/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/en/components/copy-button.md.
While data-state="copying" / aria-busy="true", repeated activation is ignored. An empty source sets error without writing the clipboard. data-copy-reset returns the control to ready after success feedback.
The controller is idempotent; the complete package can instead import @a3s-lab/ui/all once. The host performs permission and business validation through cancelable before-* events.
Copy must not disguise download, sharing, or authorization. The host explicitly supplies sensitive values; the component never reads the clipboard or protected data on its own.
The component publishes a reusable interaction boundary only. Data fetching, persistence, permission, trusted content, and business entities remain host-owned.
Keyboard Enter/Space activates the native button. Feedback stays in the same control via aria-live. Copying announces busy state without changing control geometry; success and failure remain text, not color alone.