2.0.0 • Published 4 months ago
@w0s/button-share v2.0.0
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>
Attributes
2.0.0
4 months ago