The clipboard copy component allows users to quickly and easily copy content to their clipboard.
Clipboard copy has three main components.
- Copy content: the content that will be copied to the user’s clipboard.
- Clipboard button: completes the copy action when clicked.
- Tooltip: informs users that clicking the button will copy the content to their clipboard, or that the content has successfully been copied.
Use clipboard copy to allow users to quickly and easily copy content to their clipboard to paste it in another location. Copy content can vary but is usually a line or block of text or code. This is useful for copying system generated key values, to both reduce user effort and the occurrence of entry errors, for example. The clipboard copy has a few features that can be used to customize the component to fit different use cases.
The clipboard copy component can be editable or read-only and both types can optionally be expandable.
An editable clipboard copy allows users to copy an editable text input box.
A read-only clipboard copy only allows the user to copy a predefined line of text that is not editable by the user.
An expandable clipboard copy allows for long lines of text to be stored in an expansion panel. Expanding the clipboard copy allows the user to view the full string that they can copy.
Clipboard copy in context
Clipboard copy can be used almost anywhere in a UI. It is commonly used in forms and definition lists.
Clipboard copy in a form
Clipboard copy in a description list
View source on GitHub