Share Button • Russwurm

Web Share API

An API allow sharing of information using the native OS sharing capabilities.


How it works

Just a very simple view to see how the API works:

<button onclick="share();">Share</button>
    function share() {
        if (navigator.share) {
                    title: "Title to Share",
                    text: "Text to Share",
                    url: "",
                .then(() => console.log('Successful share'))
                .catch((error) => console.log('Error sharing', error));
        } else {
            console.log("Web Share API is not supported in your browser.")


Web Share API with Fallback