Skip to main content

Pivotal UI

v19.0.0
Components / Copy to clipboard

Copy to clipboard

The copy to clipboard functionality can be applied to a variety of elements.

Copy options
ReferenceError: React is not defined
Readonly input and copy button
ReferenceError: React is not defined

Props

PropertyRequiredTypeDefaultDescription
onClicknoFunction() => ()Click handler
textyesStringText that is copied when the user clicks
tooltipnoString"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';