Properties#
CopyOnClick properties#
| Type | Description | |
|---|---|---|
showCursor | boolean | (optional) Define if the copy cursor should be visible. Defaults to true. |
disabled | boolean | (optional) If true, the copy functionality and copy cursor will be omitted. Defaults to false. |
copyContent | React.ReactNode | (optional) Contents to copy. Used when the copied value should differ from the visually shown value(children). |
tooltipContent | React.ReactNode | (optional) The message shown in the tooltip when the content is copied. Defaults to the translation CopyOnClick.clipboardCopy. |
children | React.ReactNode | (required) Contents. |
CopyOnClick.Button properties#
| Type | Description | |
|---|---|---|
copyContent | string number | (required) The text to copy. |
title | React.ReactNode | (optional) Describes what the button copies, such as "Copy account number". When the button has no text, it is also used as the aria-label and defaults to the translation CopyOnClick.buttonTitle. |
tooltipContent | React.ReactNode | (optional) The message shown in the tooltip when the content is copied. Defaults to the translation CopyOnClick.clipboardCopy. |
icon | IconIcon | (optional) Icon displayed on the button. Defaults to the copy icon. |
variant | "primary" "secondary" "tertiary" | (optional) Button variant. Defaults to tertiary. |
Button | Various | (optional) All button properties. A tooltip is hidden while the copy confirmation is shown. |
Translations#
More info about translations can be found in the general localization and Eufemia Forms localization docs.
| Key | nb-NO | en-GB | sv-SE | da-DK |
|---|---|---|---|---|
CopyOnClick.clipboardCopy | Kopiert | Copied | Kopierad | Kopieret |
CopyOnClick.buttonTitle | Kopier | Copy | Kopiera | Kopiér |