Docs

Documentation versions (currently viewingVaadin 25.4 (pre-release))

Copy, Paste, Duplicate & Delete

Copy, paste, duplicate, and delete components from their menu or with keyboard shortcuts.

A component’s menu has what you’d expect of any editor: copy, paste, duplicate, and delete. Each changes the code.

Duplicate a button, delete it, and copy a field
  1. Select a component and open its menu: click ⋮ in its badge, or right-click the component. Duplicate adds a copy right after it.

  2. Delete removes the selected component, here the copy, from the view and from ContactView.java.

  3. Copy puts the selected component on the clipboard, here the Phone field.

  4. Select a component and choose Paste. The copy goes after it, here at the end of the form.

Keyboard Shortcuts

Windows & Linux macOS Does

Ctrl+C

⌘+C

Copies the selected component.

Ctrl+V

⌘+V

Pastes after the selected component.

Ctrl+D

⌘+D

Duplicates the selected component.

Delete

Delete

Deletes the selected component.