About the Share Button for Vaadin category

Share Button for Vaadin: ## 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 (except firefox) and also on PWA’s
  • Customizable to fit your app’s design.

Installation

Add the following to your pom.xml:

<dependency>
    <groupId>org.vaadin.addons.whosfritz</groupId>
    <artifactId>vaadin-share-button</artifactId>
    <version>1.0.0</version>
</dependency>

Usage

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);