Buttons & Actions
v1.0.0Added in 1.0.0
Copy an IBAN, a tax ID, a link or an API key with one tap: an icon button with a tooltip, a labelled button, and CopyText for inline values.
Click the copy icon next to the IBAN: it shrinks away, a check pops in and draws itself, and the tooltip says Copied without closing. Clicking again restarts the timer; after the timeout the copy icon comes back. With the keyboard, Tab to a button (the tooltip opens on focus) and press Enter or Space. A labelled button swaps its label to the copied text and keeps its width. CopyText makes the value itself the target: hover shows a dotted underline, a copy flashes the text once. A value read from a function that takes longer than 300ms shows the spinner; a failing or empty one shows an X and announces the error. On a phone there is no tooltip: the check, a short vibration and the screen reader announcement carry the feedback, and the small size still has a 44px hit area.
npx wingo-ui@latest add copy-buttonPro item: the CLI needs a Pro account. See plans
Tab to a button and press Enter to copy. Paste anywhere to check.
Tap an icon to copy, then paste anywhere to check.
"Copy" → "Copied" · error "Copy failed" · 2000 ms