@w0s/button-share
v2.1.0
Published
Share button
Downloads
4
Readme
Share button
Share button using Web Share API.
Demo
Examples
<script type="importmap">
{
"imports": {
"@w0s/button-share": "..."
}
}
</script>
<script type="module">
import ButtonShare from '@w0s/button-share';
for (const targetElement of document.querySelectorAll('.js-button-share')) {
new ButtonShare(targetElement);
}
</script>
<button type="button" class="js-button-share"
data-text="Message text"
data-title="Page title"
data-url="/path/to"
>Share</button>