--- id: Clipboard copy section: components cssPrefix: pf-v5-c-clipboard-copy ---## Examples ### Basic ```html

``` ### Expandable ```html

Editable


This is an editable version of the copy to clipboard component that has an expandable section. Got a lot of text here, need to see all of it? Click that arrow on the left side and check out the resulting expansion.

Read-only


This is an editable version of the copy to clipboard component that has an expandable section. Got a lot of text here, need to see all of it? Click that arrow on the left side and check out the resulting expansion.

Code


{ "menu": {
    "id": "file",
    "value": "File",
    "popup": {
      "menuitem": [
        {"value": "New", "onclick": "CreateNewDoc()"},
        {"value": "Open", "onclick": "OpenDoc()"},
        {"value": "Close", "onclick": "CloseDoc()"}
      ]
    }
  }}
  
``` ### Inline compact ```html
2.3.4-2-redhat
``` ### Inline compact code ```html
2.3.4-2-redhat
``` ### Inline compact with additional action ```html
2.3.4-2-redhat
``` ### Inline compact in sentence ```html

Basic

Lorem ipsum 
2.3.4-2-redhat
 dolor sit amet.

Long copy string

Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
https://app.openshift.io/path/sub-path/sub-sub-path/?runtime=quarkus/12345678901234567890/abcdefghijklmnopqrstuvwxyz1234567890
 Mauris luctus, libero nec dapibus ultricies, urna purus pretium mauris, ullamcorper pharetra lacus nibh vitae enim.

Long copy string in block

Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
https://app.openshift.io/path/sub-path/sub-sub-path/?runtime=quarkus/12345678901234567890/abcdefghijklmnopqrstuvwxyz1234567890
 Mauris luctus, libero nec dapibus ultricies, urna purus pretium mauris, ullamcorper pharetra lacus nibh vitae enim. ``` ## Documentation ### Accessibility | Attribute | Applied to | Outcome | | -- | -- | -- | | `aria-label="Copy to clipboard"`, `aria-label="Show content"` | `.pf-v5-c-button.pf-m-control` | Provides an accessible name for the button when an icon is used instead of text. **Required when an icon is used with no supporting text.** | | `aria-label="[input label text]"` | `.pf-v5-c-form-control` | Provides an accessible label for the input. Provide a label that describes the contents in the input. **Required** | | `aria-hidden="true"` | `` | Hides the icon from assistive technologies. | | `aria-controls="[id of expandable element]"` | `.pf-v5-c-button.pf-m-control` | Identifies the element controlled by the toggle button. **Required** | | `hidden` | `.pf-v5-c-clipboard-copy__expandable-content` | Indicates that the expandable content is hidden so that it isn't visible in the UI and isn't accessed by assistive technologies. | | `aria-labelledby="[id of button] [id of input label]"` | `.pf-v5-c-button.pf-m-control` | Provides an accessible name that is unique and communicates context of the button. Required when more than one ClipboardCopy component exists on the page. **Important:** If the label is defined on the `` using `aria-label`, then use the `id` of the ``. If the label is defined in a `