How to invoke native share sheet from website

This post explains the technique to open the native share sheet from a webpage via the share() method.

Flo

Today I’ve wondered if it is possible to invoke the native share sheet from a web application.

This would be especially useful to remove some share buttons from the web page as it clutters the page. If you want to “control” the format in which your e.g blog post is shared, you can implement a button which invokes the share()method.

For a MWE, you can consult the MDN documentation.