Copy to clipboard
The copy to clipboard functionality can be applied to a variety of elements.
Props
Property | Required | Type | Default | Description |
---|---|---|---|---|
onClick | no | Function | () => () | Click handler |
text | yes | String | Text that is copied when the user clicks | |
tooltip | no | String | "Copied" | Text to show in tooltip after click |
Imports
Import React components (including CSS):
import {CopyToClipboard} from 'pivotal-ui/react/copy-to-clipboard';
Import CSS only:
import 'pivotal-ui/css/copy-to-clipboard';