A modern, configurable social sharing library.
import { SocialShare } from './social-share.esm.js';
const share = new SocialShare({
platforms: ['x', 'facebook', 'pinterest', 'whatsapp', 'copylink'],
content: {
url: window.location.href,
title: document.title
}
});
share.mount(document.body);
share.display();
Select which platforms to display in the share bar:
The share bar should appear on the left side (desktop) or bottom (mobile).
Share bar can also be placed inside a container (static mode with circle buttons):
// Events will appear here...