CopyButton
A clipboard action with stable geometry and localized result feedback.
Preview
Use CopyButton
CopyButton is a named export of @flood-md/react. Connect the package once, then import what you use.
Design notes
- Copies only on a user click. Requires a secure context and Clipboard API; onCopyError receives unavailable/denied errors. The host owns any manual-copy fallback. Native button ref and disabled semantics are preserved.
- Localize copyLabel/copiedLabel/errorLabel. resetDelay restores the idle state after success. Labels reserve their common width and a live status announces the result. No remote data transfer is built in. Available in 0.2.5.
API reference
View TypeScript source