CopyToClipboard
A button to copy content to the user's clipboard.
Internal Component
This component is intended solely for use within GitHub and is not available for external use.React
ready
Props
CopyToClipboard
No props documented
CopyToClipboardButton
| Name | Default | Description |
|---|---|---|
onCopy | () => voidOptional callback that is invoked after copying is initiated. | |
textToCopy Required | stringText that will be copied to the clipboard. |
CopyToClipboardIconButton
| Name | Default | Description |
|---|---|---|
icon | CopyIcon | IconOcticon that is displayed on the copy button |
size | "small" | "medium" | "large"Size of the button, passed to IconButton | |
onCopy | () => voidOptional callback that is invoked when the user clicks the copy button | |
textToCopy Required | stringText that will be copied to the clipboard | |
tooltipProps | Omit<TooltipProps, "aria-label" | "text" | "type" | "id" | "aria-hidden">Props that will be applied to tooltips | |
variant | "invisible" | anyWhich icon button variant to use |
ariaLabel | `Copy "${textToCopy}" to clipboard` | stringText that will be displayed in the tooltip |