Components
CopyButton
Copy with feedback: the Copy glyph swaps to Check for 1500ms, the label / tooltip reads “Copied” (updated in place), a polite status announces “Copied to clipboard”, and a toast reports clipboard failures.
Icon and labelled
Default: ghost 32×32 with a 20px icon (code block, tooltip below). xs: 24×24 / 16px (message actions, muted until hover). showLabel: icon + text, sm.
light
dark
last copied: —
Async values and errors
A function value is resolved on click (the button shows a spinner while it waits). A rejected clipboard write or value keeps the Copy glyph and shows the error toast.