Copy value

Outside the canon

Click-to-copy for record numbers, tracking IDs and reference codes: the workshop's Copy Button exactly (2026-10-08). The rule: a value you paste somewhere else gets a copy, a value you only read does not — not amounts, dates or names. The whole mono value plus the icon is one button (px-2 py-1, rounded-md); the icon rests at 40% stone and goes stone-dark on hover, with a surface-muted wash on the whole button. Copied swaps the icon for a check and the whole button to status-success-bg for 2 seconds. Icon 16px by default, 14px in inline and table contexts. Feedback stays in place rather than a toast, with an aria-live line for screen readers. A value that must stay a link keeps its link and gets the icon-only form of the same button beside it.

App: a `clipboard` Stimulus controller (new): the value to copy, and a `copied` class toggled for 2s that swaps the two icon spans and the background

Default

#default

The workshop's Copy Button: the whole mono value and the icon are one button. The icon rests at 40% stone; hover the button for the surface-muted wash and a stone-dark icon. Press it: a check on status-success-bg for 2 seconds, then back.

In the Document rail

#rail

In context the icon is 14px (size="sm"). The button is pulled back by its own padding, so the value still ends on the rail's right edge.

Number
Tracking #
IssuedFeb 3, 2026

Props

NameTypeDefaultNotes
valuestring—What lands on the clipboard, and what is shown
childrenReactNode—Only for a value that must stay a link: the link is drawn as given and the copy becomes an icon-only button beside it
copy_labelstringCopy to clipboardTooltip and accessible name (the name also carries the value)
monobooleantrueThe workshop sets every copyable value mono
sizebase | smbaseIcon 16px; sm (14px) inline, in a table or in the Document rail