Marketing · Gutenberg

Popup block for WordPress

Popup/lightbox builder with a configurable trigger button and rich popup content — heading, text, image, CTA and close. Supports click, scroll-depth, time-delay and exit-intent triggers.

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

Popup/lightbox builder with a configurable trigger button and rich popup content — heading, text, image, CTA and close. Supports click, scroll-depth, time-delay and exit-intent triggers.

Inspector panels on this block: Trigger Button, Trigger Type, Popup Layout, Image, CTA & Dismiss. Those titles come from index.js, not from a shared template.

Behavior controls: “Button Style” options: Filled, Outline, Ghost; “Button Size” options: Small, Medium, Large; “Button Alignment” options: Left, Center, Right; “When to Show” options: Button Click, Scroll Depth, Time Delay, Exit Intent.

Where to find it

Gutenberg inserter → Marketing → search “Popup” (block name `blockenberg/popup` in block.json). Style it in the sidebar after insert.

How to use Popup block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Popup”, insert it. Category: Marketing.
  3. Configure inspector controls that exist on this block. Open Trigger Button. Set “Button Label”, “Button Style”, “Button Size”, “Button Alignment”.
  4. Check the published page. The view script reads HTML data attributes: data-opts, data-rendered, data-uid. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
Button LabelText field in the inspector. block.json default: Open Popup. Saved as `triggerLabel`.
Button StyleSelect control; the chosen value is saved on the block. Options: Filled; Outline; Ghost. block.json default: filled. Saved as `triggerStyle`.
Button SizeSelect control; the chosen value is saved on the block. Options: Small; Medium; Large. block.json default: md. Saved as `triggerSize`.
Button AlignmentSelect control; the chosen value is saved on the block. Options: Left; Center; Right. block.json default: center. Saved as `triggerAlign`.
When to ShowSelect control; the chosen value is saved on the block. Options: Button Click; Scroll Depth; Time Delay; Exit Intent. block.json default: click. Saved as `triggerType`.
Scroll Depth (%)Numeric range control in the inspector. Range 10–100. block.json default: 40. Saved as `scrollDepth`.
Delay (seconds)Numeric range control in the inspector. Range 1–30. block.json default: 3. Saved as `timeDelay`.
Show FrequencySelect control; the chosen value is saved on the block. Options: Always; Once per Session; Once Ever. block.json default: always. Saved as `showOnce`.
PositionSelect control; the chosen value is saved on the block. Options: Center; Drawer — Right; Drawer — Bottom. block.json default: center. Saved as `popupPosition`.
Popup Layout — SizeSelect control; the chosen value is saved on the block. Options: Small; Medium; Large; Custom. block.json default: md. Saved as `popupSize`.
Custom Width (px)Numeric range control in the inspector. Range 300–1000. block.json default: 560. Saved as `popupWidth`.
AnimationSelect control; the chosen value is saved on the block. Options: Scale; Fade; Slide Up; Slide Right. block.json default: scale. Saved as `popupAnimation`.
Border Radius (px)Numeric range control in the inspector. Range 0–40. block.json default: 16. Saved as `borderRadius`.
Close on Overlay ClickOn/off toggle in the inspector. On by default. Saved as `closeOnOverlay`.
Show Close ButtonOn/off toggle in the inspector. On by default. Saved as `showCloseBtn`.
Overlay Opacity (%)Numeric range control in the inspector. Range 10–95. block.json default: 60. Saved as `overlayOpacity`.
Image PositionSelect control; the chosen value is saved on the block. Options: Top; Left; Right; None. block.json default: top. Saved as `imagePosition`.
Show CTA ButtonOn/off toggle in the inspector. On by default. Saved as `showCta`.
CTA LabelText field in the inspector. block.json default: Claim Your Discount. Saved as `ctaLabel`.
CTA URLText field in the inspector. block.json default: #. Saved as `ctaUrl`.
Open in New TabOn/off toggle in the inspector. Off by default. Saved as `ctaNewTab`.
CTA StyleSelect control; the chosen value is saved on the block. Options: Filled; Outline. block.json default: filled. Saved as `ctaStyle`.
Show Dismiss LinkOn/off toggle in the inspector. On by default. Saved as `showDismiss`.
Dismiss LabelText field in the inspector. block.json default: No thanks. Saved as `dismissLabel`.
Padding Top (px)Numeric range control in the inspector. Range 0–240. block.json default: 0. Saved as `paddingTop`.
Padding Bottom (px)Numeric range control in the inspector. Range 0–240. block.json default: 0. Saved as `paddingBottom`.
Heading TypographyShared Blockenberg typography popover (family, size, weight, spacing). Saved as `headingTypo`.
Body TypographyShared Blockenberg typography popover (family, size, weight, spacing). Saved as `bodyTypo`.
Trigger Button BGColor control in the inspector. block.json default: #6366f1. Saved as `triggerBg`.
Trigger Button TextColor control in the inspector. block.json default: #ffffff. Saved as `triggerColor`.
Overlay ColorColor control in the inspector. block.json default: #000000. Saved as `overlayColor`.
Popup BackgroundColor control in the inspector. block.json default: #ffffff. Saved as `popupBg`.
HeadingColor control in the inspector. block.json default: #111827. Saved as `headingColor`.
Body TextColor control in the inspector. block.json default: #4b5563. Saved as `textColor`.
CTA Button BGColor control in the inspector. block.json default: #6366f1. Saved as `btnBg`.
CTA Button TextColor control in the inspector. block.json default: #ffffff. Saved as `btnColor`.
Dismiss TextColor control in the inspector. block.json default: #9ca3af. Saved as `dismissColor`.

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

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Popup”. It sits under Marketing. After insert, open Trigger Button and set “Button Label”, “Button Style”, “Button Size”, “Button Alignment”.

Where does Popup store visitor state?

In localStorage on that browser. Clearing site data resets it. It is not a WordPress user meta field unless render.php says so.

Is the Popup Gutenberg block free?

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

Can I style Popup 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: Trigger Button, Trigger Type, Popup Layout, Image).

Related marketing blocks

Get Blockenberg

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

Get Blockenberg