Form

CopyToClipboard

A Copy to Clipboard button offers a button which copies given content to the user's clipboard when clicked.
1
import {CopyToClipboard} from '@coveord/plasma-mantine';
2
3
const Demo = () => <CopyToClipboard value="Copy me!" />;
4
export default Demo;

Props

NameTypeDefaultDescription
valuerequiredstring
The value to be copied to the clipboard.
onCopy() => void
Called each time the value is copied to the clipboard
withLabelbooleanfalse
Whether to display the string to be copied alongside the button.

Examples

With Label
1
import {CopyToClipboard} from '@coveord/plasma-mantine';
2
3
const Demo = () => <CopyToClipboard value="Copy me!" withLabel />;
4
export default Demo;

No guidelines exist for CopyToClipboard yet.

Create guidelines