Web Share API

Share content with other apps installed on the user's device.

Interactive Demo
Try sharing content with different options
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.