Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ id: Clipboard copy
section: components
---

import '../components.css';

## Elements
Clipboard copy has 3 main components.

<img src="./img/clipboard-copy-elements.png" alt="Elements of the clipboard copy component" width="468"/>
<div class="ws-docs-content-img">
![Elements of the clipboard copy component.](./img/clipboard-copy-elements.svg)
</div>

1. **Copy content:** the content that will be copied to the user’s clipboard.
2. **Clipboard button:** completes the copy action when clicked.
Expand All @@ -22,45 +26,57 @@ The clipboard copy component can be editable or read-only and both types can opt

An editable clipboard copy allows users to copy an editable text input box.

<img src="./img/editable.png" alt="Example of an editable clipboard copy component" width="434"/>
<div class="ws-docs-content-img">
![Example of an editable clipboard copy component.](./img/clipboard-copy-editable.svg)
</div>

**Read-only**

A read-only clipboard copy only allows the user to copy a predefined line of text that is not editable by the user.

<img src="./img/read-only.png" alt="Example of a read-only clipboard copy component" width="434"/>
<div class="ws-docs-content-img">
![Example of a read-only clipboard copy component.](./img/clipboard-copy-readonly.svg)
</div>

**Expandable**

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.

<img src="./img/expandable.png" alt="Example of an expandable clipboard copy component" width="455"/>
<div class="ws-docs-content-img">
![Example of an expandable clipboard copy component.](./img/clipboard-copy-expandable.svg)
</div>

**Inline compact**

An inline compact clipboard copy is placed directly inline with other text or used on its own when you want a lighter weight clipboard copy treatment.

<img src="./img/inline-one-action.png" alt="Example of an inline compact clipboard copy component with one action" width="355"/>
<div class="ws-docs-content-img">
![Example of an inline clipboard copy component with one action.](./img/clipboard-copy-inline-compact-1.svg)
</div>

An inline compact clipboard copy can include one or two action buttons next to it. The second action is customizable and optional.

<img src="./img/inline-two-actions.png" alt="Example of an inline compact clipboard copy component with two actions" width="355"/>
<div class="ws-docs-content-img">
![Example of an inline clipboard copy component with two actions.](./img/clipboard-copy-inline-compact-2.svg)
</div>

### 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**

<img src="./img/form.png" alt="Example of clipboard copy in a form" width="1067"/>
<div class="ws-docs-content-img">
![Example of clipboard copy in a form.](./img/clipboard-copy-form.svg)
</div>

**Clipboard copy in a description list**

<img src="./img/description-list.png" alt="Example of clipboard copy in a description list" width="629"/>

**Inline compact clipboard copy for URLs**

<img src="./img/clipboard-copy-url.png" alt="Example of an inline compact clipboard copy next to a URL" width="657"/>
<div class="ws-docs-content-img">
![Example of clipboard copy in a description list.](./img/clipboard-copy-description-list.svg)
</div>

**Inline compact clipboard copy in context**

<img src="./img/inline-in-context.png" alt="Example of an inline compact clipboard copy in context" width="448"/>
<div class="ws-docs-content-img">
![Example of an inline compact clipboard copy in context.](./img/clipboard-copy-inline-compact-4.svg)
</div>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.