ClickToCopy[expr]
represents a button that copies expr whenever it is clicked.
ClickToCopy[label,expr]
displays with label on the button.


ClickToCopy
ClickToCopy[expr]
represents a button that copies expr whenever it is clicked.
ClickToCopy[label,expr]
displays with label on the button.
Details

- 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.
Examples
open all close allBasic Examples (4)
Scope (2)
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:
See Also
Related Guides
History
Text
Wolfram Research (2020), ClickToCopy, Wolfram Language function, https://reference.wolfram.com/language/ref/ClickToCopy.html.
CMS
Wolfram Language. 2020. "ClickToCopy." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ClickToCopy.html.
APA
Wolfram Language. (2020). ClickToCopy. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ClickToCopy.html
BibTeX
@misc{reference.wolfram_2025_clicktocopy, author="Wolfram Research", title="{ClickToCopy}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/ClickToCopy.html}", note=[Accessed: 10-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_clicktocopy, organization={Wolfram Research}, title={ClickToCopy}, year={2020}, url={https://reference.wolfram.com/language/ref/ClickToCopy.html}, note=[Accessed: 10-August-2025]}