Web Share API
Share content with other apps installed on the user's device.
Browser Support
The Web Share API is supported in most modern browsers, particularly on mobile devices. It requires HTTPS and is most commonly used on mobile platforms.
Interactive Demo
Try sharing content with different options
Not Supported
The Web Share API is not supported in your browser. Please use a supported browser or device.
API Reference
Comprehensive documentation of the Web Share API features and usage
navigator.share()
Initiates sharing of content with other apps.
try {
await navigator.share({
title: 'Share Title',
text: 'Share Description',
url: 'https://example.com'
});
} catch (error) {
console.error('Error sharing:', error);
}
navigator.canShare()
Checks if the specified data can be shared.
if (navigator.canShare({
title: 'Share Title',
text: 'Share Description'
})) {
// Proceed with sharing
}
About Web Share API
What is it?
The Web Share API allows web apps to share content with other apps installed on the user's device, providing a native sharing experience.
Key Features
- Native sharing experience
- File sharing support
- Cross-platform compatibility
- Fallback support
Use Cases
- Social media sharing
- File sharing
- Content distribution
- App-to-app communication
Browser Support
Widely supported on mobile browsers and some desktop browsers. File sharing support varies by platform.