Marketing · Gutenberg

Phone Button block for WordPress

A floating or inline click-to-call / WhatsApp button with pulse animation.

Get Blockenberg

Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.

Get Blockenberg

What it actually does

A floating or inline click-to-call / WhatsApp button with pulse animation.

Inspector panels on this block: Contact Details, Layout. Those titles come from index.js, not from a shared template.

Behavior controls: “Mode” options: Phone only, WhatsApp only, Both; “Layout” options: Floating (fixed), Inline; “Screen Position” options: Bottom Right, Bottom Left, Bottom Center, Top Right, Top Left.

Where to find it

Gutenberg inserter → Marketing → search “Phone Button” (block name `blockenberg/phone-button` in block.json). Style it in the sidebar after insert.

How to use Phone Button block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Phone Button”, insert it. Category: Marketing.
  3. Configure inspector controls that exist on this block. Open Contact Details. Set “Mode”, “Phone Number”, “WhatsApp Number (intl format)”, “WhatsApp Pre-filled Message”.
  4. Check the published page. The view script reads HTML data attributes: data-opts. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
ModeSelect control; the chosen value is saved on the block. Options: Phone only; WhatsApp only; Both. block.json default: both. Saved as `mode`.
Phone NumberText field in the inspector. block.json default: +1234567890. Saved as `phoneNumber`.
WhatsApp Number (intl format)Text field in the inspector. Saved as `whatsappNumber`.
WhatsApp Pre-filled MessageMultiline text field in the inspector. block.json default: Hello! I'd like to get in touch.. Saved as `whatsappMessage`.
LayoutSelect control; the chosen value is saved on the block. Options: Floating (fixed); Inline. block.json default: floating. Saved as `layout`.
Screen PositionSelect control; the chosen value is saved on the block. Options: Bottom Right; Bottom Left; Bottom Center; Top Right; Top Left. block.json default: bottom-right. Saved as `position`.
Show Pulse AnimationOn/off toggle in the inspector. On by default. Saved as `showPulse`.
Show Button LabelOn/off toggle in the inspector. Off by default. Saved as `showText`.
Label TextText field in the inspector. block.json default: Call us. Saved as `buttonText`.
Button Size (px)Numeric range control in the inspector. Range 36–100. block.json default: 56. Saved as `buttonSize`.
Icon Size (px)Numeric range control in the inspector. Range 14–56. block.json default: 26. Saved as `iconSize`.
Border Radius (px)Numeric range control in the inspector. Range 0–999. block.json default: 999. Saved as `borderRadius`.
Gap Between Buttons (px)Numeric range control in the inspector. Range 4–40. block.json default: 14. Saved as `gap`.
Shadow Strength (%)Numeric range control in the inspector. Range 0–80. block.json default: 30. Saved as `shadowStrength`.
Show After Scroll (px, 0 = always)Numeric range control in the inspector. Range 0–1000. block.json default: 0. Saved as `scrollOffset`.
Phone Button BGColor control in the inspector. block.json default: #6366f1. Saved as `phoneBg`.
Phone Button IconColor control in the inspector. block.json default: #ffffff. Saved as `phoneColor`.
Phone Pulse ColorColor control in the inspector. block.json default: #6366f1. Saved as `phonePulseBg`.
WhatsApp Button BGColor control in the inspector. block.json default: #25d366. Saved as `whatsappBg`.
WhatsApp Button IconColor control in the inspector. block.json default: #ffffff. Saved as `whatsappColor`.
WhatsApp Pulse ColorColor control in the inspector. block.json default: #25d366. Saved as `whatsappPulseBg`.
Label BackgroundColor control in the inspector. block.json default: #1e1b4b. Saved as `labelBg`.
Label Text ColorColor control in the inspector. block.json default: #ffffff. Saved as `labelColor`.

What the front-end script actually does

When this is the right block

Notes from the implementation

viewScript: this folder’s frontend.js is enqueued on the front end for this block.

FAQ

How do I add the Phone Button block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Phone Button”. It sits under Marketing. After insert, open Contact Details and set “Mode”, “Phone Number”, “WhatsApp Number (intl format)”, “WhatsApp Pre-filled Message”.

What makes Phone Button different from other Blockenberg blocks?

A floating or inline click-to-call / WhatsApp button with pulse animation. Inspector labels on this block include “Mode”, “Phone Number”, “WhatsApp Number (intl format)”, “WhatsApp Pre-filled Message”.

Is the Phone Button Gutenberg block free?

Yes. Phone Button ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Phone Button to match my theme?

Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Contact Details, Layout).

Related marketing blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Phone Button from the Gutenberg inserter.

Get Blockenberg