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 customizable WhatsApp contact button to your Drupal site, either as a floating bubble or a block. You can configure the phone number, message, alignment, and color, with options to override settings on a per-block basis.

Description

Whatsapp Bubble provides a lightweight way to add a WhatsApp contact entry point to your Drupal site. It supports:
- A floating WhatsApp bubble auto-injected on non-admin pages.
- A “Whatsapp Bubble” block that renders the same bubble via block placement.
- A “Whatsapp Button” block variant with a label (e.g., “Escríbenos a”).
- Per-block phone number overrides so different sections can link to different numbers.

Both the floating bubble and blocks use the same theme and library so they look consistent and are easy to style.

Installation

1) Enable the module: Extend → Whatsapp Bubble.
2) Clear caches if needed: drush cr.

Configuration (Global)

Path: /admin/config/services/whatsapp-bubble

Settings:
- Enable floating bubble: When enabled, the module injects the WhatsApp bubble at the bottom of all non-admin pages. Useful when you are not using the block, or to temporarily hide the bubble.
- Alignment: Horizontal alignment for the bubble (left, center, right).
- Vertical alignment: Vertical alignment (top, middle, bottom).
- Phone Number: Destination WhatsApp number (E.164 format recommended).
- Message: Default message prefilled in the WhatsApp chat.
- Inverse color: Swap colors (green background with white icon).

Blocks

Whatsapp Bubble block:

  • Renders the same floating bubble via block placement.
  • If the global floating bubble is enabled, the block configuration form shows a warning and links to the global settings. Disable the global bubble to avoid rendering two bubbles on the same page.
  • Supports per-block phone override.

Whatsapp Button block:

  • Button-style variant with a small text label displayed above “WhatsApp”.
  • Supports per-block phone override.
  • Small text label is configurable on the block form.

Per-block phone override

Both blocks can override the global phone number:
1) Edit the block.
2) Check “Override phone number for this block”.
3) Enter the desired number. If left empty or override is disabled, the global number is used.

Theming & Assets

  • Templates: templates/wab.html.twig (bubble), templates/wab-button.html.twig (button).
  • Library: whatsapp_bubble/main provides the CSS for both renderings.
  • Common CSS classes: “whatsapp-bubble”, plus alignment classes (“left”/“center”/“right”, “top”/“middle”/“bottom”) and “inverse” when the inverse color option is enabled.

Caching

  • Render arrays include cache tag: config:whatsapp_bubble.config. Configuration changes automatically invalidate the output.

Notes

  • Global bubble does not render on admin routes.
  • To avoid duplicates, either disable the global bubble or do not place the Whatsapp Bubble block.

Activity

Total releases
3
First release
Sep 2025
Latest release
9 months ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Slowing

Release Timeline

Releases

Version Type Release date
1.0.2 Stable Sep 24, 2025
1.0.1 Stable Sep 3, 2025
1.0.0 Stable Sep 3, 2025