Skip to main content

CopyButtonWrapper

CopyButtonWrapper Component Demo

A React component that wraps content and provides a button to copy text to the clipboard.

Props:

  • copyText: The text that will be copied to the clipboard when the button is clicked.
  • buttonLabel: The label or icon displayed on the copy button.
  • copiedMessage: The message shown after the text is copied.

Basic usage

<CopyButtonWrapper copyText="Hello, world!" buttonLabel="📋" copiedMessage="Copied!" />

Example