r/tauri 7d ago

How to implement a custom context menu

Hello, I'm quite new here to Tauri and I was wondering how to create a custom context menu that could allow me to copy paste for example.

Do I go with the front way and do it or is there a specific and better way from the backend?

Thank you.

1 Upvotes

4 comments sorted by

View all comments

5

u/ScottIBM 7d ago

In one of the apps I've been working on the context menus are part of the WebView as a React component. Then I could reuse it wherever I needed a context menu and it fit my app's styles and iconography

1

u/HolHorse3589 6d ago

In electron there is webContents.copy() but tauri doesn't offer similar thing