Cal.comdesign-system

Copyable Field

A field whose primary action is copying its value.

Use CopyableField when copying is a first-class action: credentials, IDs, callback URLs, or generated secrets. It provides the input, copy control, tooltip, and anchored success feedback as one composition.

It is read-only by default. Set readOnly={false} with onChange only when the same control is both editable and intentionally copyable. copyValue may differ from the displayed value.

For slug and username editors, follow Input addons and URL fields and use UrlInputWithAddon. Do not recreate responsive URL behavior through CopyableField props when copying is not part of the product interaction.

Props

Example

Composition matches a real product call site. Copy is paraphrased.

apps/web · SSO connection info

The example matches SSO connection details: the value is generated, cannot be edited, and copying it is the primary action.

Call sites

Example URLs

Not exhaustive — a few places you can open locally (e.g. http://localhost:3000) to see this in product.

Source

packages/coss-ui/src/shared/copyable-field.tsx