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
monowhen 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
labelto say what is copied (“Copy order ID”).
Don't
- Don't use it for long text the user may want to edit first.
Props
| Prop | Type |
|---|---|
value required | string |
label | string |
showLabel | boolean |
Use
const { CopyButton } = window.Tessera;
const el = React.createElement(CopyButton, { /* props */ });