Share Button for Vaadin - Vaadin Add-on Directory
Adapter for navigator API## Vaadin Share Button
**Vaadin Share Button** is an add-on that integrates a share button into your Vaadin app using the native Web Share API. This allows users to easily share content to social media and messaging platforms.
### Features
- **Easy integration** with Vaadin apps.
- **Cross-platform**: Works on mobile and desktop browsers.
- **Customizable** to fit your app's design.
### Installation
Add the following to your `pom.xml`:
```xml
org.vaadin.addons.whosfritz
vaadin-share-button
0.0.3
```
### Usage
```java
ShareButton shareButton = new ShareButton();
shareButton.setIcon(VaadinIcon.SHARE.create()); // Set the icon
shareButton.setText("Share this content"); // Set the button text
shareButton.setTitle("Share Button"); // Set the title
shareButton.setUrl("https://example.com"); // Set the URL to share
shareButton.addClickListener(event -> sharePage());
layout.add(shareButton);
```
View on GitHub