Marketing · Gutenberg

Floating CTA block for WordPress

Fixed-position floating call-to-action button that sticks during scroll. Configurable position, icon, label, and trigger delay.

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

Fixed-position floating call-to-action button that sticks during scroll. Configurable position, icon, label, and trigger delay.

Inspector panels on this block: Button, Position. Those titles come from index.js, not from a shared template.

Behavior controls: “Screen Position” options: Bottom Right, Bottom Left, Bottom Center, Top Right, Top Left; “Scroll to Show (px)” (Show after scrolling this many pixels (0 = always visible)).

Where to find it

Gutenberg inserter → Marketing → search “Floating CTA” (block name `blockenberg/floating-cta` in block.json). Style it in the sidebar after insert.

How to use Floating CTA block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Floating CTA”, insert it. Category: Marketing.
  3. Configure inspector controls that exist on this block. Open Button. Set “Label”, “URL / Link”, “Open in New Tab”, “Show Label Text”.
  4. Check the published page. The view script reads HTML data attributes: data-dismiss, data-scroll-trigger. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
LabelText field in the inspector. block.json default: Get a Quote. Saved as `label`.
URL / LinkText field in the inspector. block.json default: #contact. Saved as `url`.
Open in New TabOn/off toggle in the inspector. Off by default. Saved as `openInNew`.
Show Label TextOn/off toggle in the inspector. On by default. Saved as `showLabel`.
Show IconOn/off toggle in the inspector. On by default. Saved as `showIcon`.
Button — IconSelect control; the chosen value is saved on the block. block.json default: megaphone. Saved as `icon`.
Icon Size (px)Numeric range control in the inspector. Range 12–40. block.json default: 20. Saved as `iconSize`.
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`.
Offset X (px)Numeric range control in the inspector. Range 0–100. block.json default: 24. Saved as `offsetX`.
Offset Y (px)Numeric range control in the inspector. Range 0–200. block.json default: 24. Saved as `offsetY`.
Scroll to Show (px)Numeric range control in the inspector. Show after scrolling this many pixels (0 = always visible). Range 0–2000. block.json default: 300. Saved as `scrollTrigger`.
Z-indexNumeric range control in the inspector. Range 100–100000. block.json default: 9999. Saved as `zIndex`.
Padding X (px)Numeric range control in the inspector. Range 8–60. block.json default: 20. Saved as `paddingX`.
Padding Y (px)Numeric range control in the inspector. Range 4–40. block.json default: 14. Saved as `paddingY`.
Border Radius (px)Numeric range control in the inspector. Range 0–60. block.json default: 50. Saved as `btnRadius`.
Button ShadowOn/off toggle in the inspector. On by default. Saved as `btnShadow`.
Pulsing RingOn/off toggle in the inspector. On by default. Saved as `pulsing`.
Show Dismiss (×)On/off toggle in the inspector. Off by default. Saved as `showDismiss`.
Button BackgroundColor control in the inspector. block.json default: #6c3fb5. Saved as `btnBg`.
Button TextColor control in the inspector. block.json default: #ffffff. Saved as `btnColor`.

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 Floating CTA block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Floating CTA”. It sits under Marketing. After insert, open Button and set “Label”, “URL / Link”, “Open in New Tab”, “Show Label Text”.

What makes Floating CTA different from other Blockenberg blocks?

Fixed-position floating call-to-action button that sticks during scroll. Configurable position, icon, label, and trigger delay. Inspector labels on this block include “Label”, “URL / Link”, “Open in New Tab”, “Show Label Text”.

Is the Floating CTA Gutenberg block free?

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

Can I style Floating CTA 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: Button, Position).

Related marketing blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Floating CTA from the Gutenberg inserter.

Get Blockenberg