Summary
Update `` to implement the PatternFly v6 Clipboard copy component.
Copy-to-clipboard control with inline and expandable variants, supporting editable and read-only modes.
Prior Art
| Source |
Element |
Status |
| PFE v4 |
`` |
Exists |
| cem |
-- |
-- |
| cockpit |
-- |
-- |
| chickadee |
-- |
-- |
Requirements
- MUST implement PFv6 visual designs
- MUST provide end-user feature parity with `@patternfly/react-core` ClipboardCopy
- MAY adjust element API to leverage web platform strengths
- SHOULD maintain CSS custom property theming compatibility
- SHOULD expose useful CSS shadow parts
Element-specific considerations
- React `variant`: `inline`, `expansion`, `json`, `inline-compact` - map to `variant` attribute
- React `hoverTip` - tooltip on hover of copy button; default "Copy to clipboard"
- React `clickTip` - tooltip text after successful copy; default "Successfully copied to clipboard!"
- React `isReadOnly` - disables text editing; map to `readonly` attribute
- React `isCode` - renders content in `
` with monospace font; map to `code` attribute
- React `isBlock` - full-width layout
- React `onChange` - fires when editable input changes (non-readonly variant)
- Copy uses `navigator.clipboard.writeText()`; handle HTTPS-only gracefully
- `expansion` variant: toggle shows/hides expanded content; button integrates with ``
Checklist
Rename
Implementation
Demos
Tests
Reviews
Ship
Summary
Update `` to implement the PatternFly v6 Clipboard copy component.
Copy-to-clipboard control with inline and expandable variants, supporting editable and read-only modes.
Prior Art
Requirements
Element-specific considerations
` with monospace font; map to `code` attributeChecklist
Rename
Implementation
Demos
Tests
Reviews
Ship