05
Content
- Name what it copies: "Copy client ID", "Copy redirect URI".
- Leave "Copied" to it: it shows it, and announces it.
- A visible label only where there's room: "Copy invite link".
Copies a value. The icon turns to a check, "Copied" is announced, and focus stays.
<button>Server-rendered01
02
icon-button<button>The root: an Icon button, or a Button with a label. data-state: idle, copied, failed.button-icon<svg>Copy; a check once copied; an alert if it couldn't.03
04
Each height follows the region's density.
| Size | Square: compact / default / comfortable | Icon |
|---|---|---|
sm | 24 / 28 / 32 | 16px |
md | 28 / 32 / 36 | 16px |
lg | 32 / 40 / 44 | 20px |
05