Implementation of the Web Share API in C# for Microsoft Blazor. The Web Share API allows a site to share text, links and other content to user-selected share targets, utilizing the sharing mechanisms of the underlying operating system.
recording.mov
Install-Package Append.Blazor.WebShare
There is a sample application in /docs folder which is also hosted as documentation.
Scoped by default.
builder.Services.AddWebShare();
@using Append.Blazor.WebShare
@inject IWebShareService WebShareService
or
[Inject] public IWebShareService WebShareService { get; set; } = default!;
bool IsSupported = await WebShareService.IsSupportedAsync()
await WebShareService.ShareAsync("Title", "Text", "https://www.google.com");
Please feel free to use the component, open issues, fix bugs or provide feedback.
This project is created and maintained by: