represents a button that copies expr whenever it is clicked.


displays with label on the button.


  • expr can be any Wolfram Language expression.
  • ClickToCopy[Defer[expr]] creates a button that displays and copies the unevaluated form of expr.
  • ClickToCopy[expr] typically renders with different margins than expr to accommodate hover behaviors.


open allclose all

Basic Examples  (4)

Create a button that copies the given string when clicked:

Create a click-to-copy typeset expression:

Create a click-to-copy graphic:

Create several buttons for copying items individually:

Scope  (2)

Create a click-to-copy button with a label:

Create a button for copying an expression without evaluating it:

Properties & Relations  (3)

Use RawBoxes to synthesize a box expression for copying:

Copy nondefault expression formatting:

Specify an object that copies with an appearance different from its interpretation:

Possible Issues  (2)

ClickToCopy prevents selecting pieces of the result with the mouse, but the arrow keys can still be used to navigate the output:

Controls within a ClickToCopy output will not be accessible to mouse events:

Wolfram Research (2020), ClickToCopy, Wolfram Language function,


Wolfram Research (2020), ClickToCopy, Wolfram Language function,


Wolfram Language. 2020. "ClickToCopy." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2020). ClickToCopy. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2023_clicktocopy, author="Wolfram Research", title="{ClickToCopy}", year="2020", howpublished="\url{}", note=[Accessed: 13-April-2024 ]}


@online{reference.wolfram_2023_clicktocopy, organization={Wolfram Research}, title={ClickToCopy}, year={2020}, url={}, note=[Accessed: 13-April-2024 ]}