Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Webshare

No security coverage Under active development 564 sites

This module adds social media sharing buttons to your website, allowing visitors to easily share content. You can control where these buttons appear and create custom ones for any platform.

Share buttons for Drupal. Visitors share the page they are reading on the networks you choose, or through the share sheet on their own device.

What you get

  • Share block. Place it in any region from Block layout, once or several times, each with its own settings.
  • Share component. A single-directory component, webshare:share, with the same settings as the block. Use it in Twig templates or drop it into a page in Drupal Canvas.
  • Views field. Add share buttons to every row of a view.
  • 13 networks ready to use. LinkedIn, Facebook, X, WhatsApp, Telegram, Reddit, Pinterest, Threads, Bluesky, Tumblr, Mastodon, Email and Copy URL. Enable the ones you want and drag them into order.
  • Your own platforms. Add any network with a name, an icon and a URL template that uses [url] and [title].
  • Native share button. Opens the device share sheet through the Web Share API. On browsers without it, the button copies the link.

Settings on every placement

  • Title, shown or hidden, with a heading level that fits the page outline.
  • Horizontal row or vertical column.
  • Start or end side. It follows the text direction, so it flips in right-to-left languages.
  • Inline with the content, or a sticky rail that follows the reader beside the content.
  • Show on all devices, hide on mobile, or show on mobile only.

For themers and developers

  • Restyle the buttons with CSS custom properties, or override the component in your theme.
  • Optional support for the Drupal core Icons API, so the buttons can use your site icon pack.
  • Config actions for recipes: set, save, enable, disable, reorder and delete platforms.
  • The buttons render as a nav landmark with a label on every link, and work with the keyboard.
  • Covered by automated browser tests on Drupal 11 and Drupal 12, including Drupal Canvas.

Requirements

Drupal core 11.4 or later, or Drupal 12. No contributed modules are needed. Drupal Canvas is optional.

Install

composer require drupal/webshare

Enable the module, choose your networks at Configuration » Web services » Webshare, then place the Share block or add the Share component to a page.

Drupal 11 · not 10

Ask your assistant about Webshare

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • path_alias Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
12
Tracked since
Dec 2024
Latest release
3 weeks ago
Releases (12 mo)
7 ▲ from 5
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.0-alpha1 Pre-release 10–11 Jan 4, 2025
1.0.x-dev Dev 10–11 Dec 14, 2024