Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module adds a configurable block to your Drupal site that provides a one-click button for users to start a WhatsApp conversation. You can customize the contact number, the pre-filled message, the button's icon, and its positioning on different screen sizes.

The WhatsApp Button module allows you to add a configurable block anywhere on your site, enabling quick and direct access to WhatsApp. With just one click, users can instantly start a conversation.

Key Features

  • Customizable contact number: Set the WhatsApp number where conversations will be directed.
  • Predefined message customization: Configure an automatic message that loads upon opening the chat, so users only need to send it.
  • Icon customization: Replace the default icon with a custom image to match your site's design.
  • Flexible positioning with CSS and media queries: Adjust the button’s position on different screen sizes to fit your layout needs.

Installation

  1. Run the following command to install the module:
    composer require 'drupal/whatsapp_button:^1.0'
  2. Go to /admin/structure/block in your site's address bar.
  3. Locate and place the WhatsApp Button block in your desired region.
  4. In the block settings, disable the "Display title" option and click "Save Block."

Customization

The WhatsApp Button functions like any other block. To edit it, hover over the contextual link and click "Edit."

On the block configuration page, you can modify multiple settings:

Text Information
Customize the message displayed on the WhatsApp page, add text next to the icon, and define a tooltip.
Image Settings
Replace the default icon with a custom image.
Define the image width using px (recommended), em, %, or any other CSS unit.
Set different image widths for tablets and desktops (mobile uses the default size).
Position Settings
Adjust the button’s position from the bottom and right of the screen.
Media Queries
Customize media query breakpoints to control how the button behaves across different devices.

Activity

Total releases
3
First release
Feb 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 3
Maintenance
Dormant

Release Timeline

Releases

Version Type Release date
1.0.4 Stable Jul 12, 2025
1.0.1 Stable Feb 21, 2025
1.0.x-dev Dev Feb 14, 2025