BrowserUX Share Button
A modern solution to enable seamless content sharing across all devices and platforms.
BrowserUX Share Button is a lightweight, accessible, and customizable Web Component that simplifies sharing URLs via the native Web Share API, when available, or a responsive fallback modal. It supports multiple platforms (Email, X, WhatsApp, etc.), automatically retrieves share metadata, and offers full localization, visual customization, and framework compatibility.
npm install browserux-share-button
Web component
See the CHANGELOG
Key Features of BrowserUX Share Button
- 📱 Uses the native Web Share API when available (mobile, PWA)
- 🗂 Falls back to a rich modal with platform links on desktop
- 🔗 Copy-to-clipboard button with app icon, title, and URL preview
- 🌐 8 built-in platforms: Email, X, Facebook, WhatsApp, SMS, LinkedIn, Telegram, Reddit
- 🔌 Custom platform registry via
ShareButton.registerPlatform() - 🧠 Auto-resolves share data from
document.title,meta, and Web App Manifest - 🌍 Built-in i18n for 12 languages, auto-detected from
html lang - ♿ Accessible: keyboard navigation, focus trapping, focus restoration
- 📡 7 custom events:
bux:share-success,bux:share-abort,bux:copy-success, and more - 🖱 Programmatic API:
share(),setShareData(),openFallback(),closeFallback() - 🎨 Fully customizable via CSS custom properties
- 🧩 Optional Shadow DOM, disable with
no-shadow