Tessera
GitHub

Actions

CopyButton

Copies a value to the clipboard and confirms with a check for 1.6s.

  • Place it directly after the value it copies (IDs, emails, keys); set the value in mono when it is an ID.
  • Give a specific label (“Copy company ID”) for screen readers.

When to use

Copy an ID, key, URL or code sample in one click.

Use something else

A value shown inline with its copy action → CopyInline.

Do

  • Place it right after the value it copies.
  • Set label to say what is copied (“Copy order ID”).

Don't

  • Don't use it for long text the user may want to edit first.

Props

PropType
value requiredstring
labelstring
showLabelboolean

Use

const { CopyButton } = window.Tessera;
const el = React.createElement(CopyButton, { /* props */ });