Copy Button
Copies code, commands, or identifiers and reports pending, success, and failure in the same action location.
Usage
Standalone controller
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.
Contract
Product boundary
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.
Accessibility
The label keeps its action meaning while a live region reports the result. Failure copy explains that the browser rejected copying and leaves a retry or manual-selection path.
