Package com.vaadin.flow.component.clipboard


@NullMarked package com.vaadin.flow.component.clipboard
Server-side access to the browser's clipboard ? both writing (copy) and reading (paste).

Use Clipboard.onClick(component) to copy text, an image, or custom content to the clipboard when a component is clicked. Use Clipboard.onPaste(...) to react to text the user pastes onto a component, and Clipboard.onFilePaste(...) to receive pasted files.

Copying goes through onClick rather than an ordinary server-side click listener because the browser only grants clipboard write access while it is handling a genuine user gesture, which is no longer valid by the time a server round trip completes. Clipboard access also requires a secure context (HTTPS or localhost).