ReformBox

Description

ReformBox extends WordPress Lightbox functionality beyond images. It currently supports Group, Paragraph, and Video blocks with poster images directly, while delegating Image lightbox behavior to WordPress core. For core/image, ReformBox only syncs the sidebar toggle with core lightbox settings.

This plugin is developed on GitHub.

Supported Blocks:

  • Image Block – Uses WordPress core lightbox behavior (ReformBox panel toggles core lightbox.enabled)
  • Video Block – Opens in a lightbox when a poster image is set (poster acts as the click trigger)
  • Group Block – Supports both same mode (same content in page + modal) and split mode (separate Preview/Modal direct child Group slots)
  • Paragraph Block – Click to open itself in a lightbox

Features:

  • No-code lightbox creation via block editor controls
  • Core-first image lightbox integration (core/image)
  • Core-aligned overlay markup for custom lightboxes
  • Core-aligned zoom animation
  • ESC key and overlay click to close
  • Accessible (ARIA attributes, focus management, keyboard navigation)
  • Group split mode with Preview/Modal slot mapping
  • Safe split fallback: if no Modal slot is assigned, Preview content is used
  • Lazy-loaded assets (CSS/JS only loaded when needed)
  • Self-lightbox videos defer preload/autoplay until opened
  • Core image workflow integration without overriding core image rendering
  • Global overlay background color and opacity controls in Settings > ReformBox
  • Plugin list row includes a Settings action link for quick access
  • Lightweight and performant

Installation

  1. In your WordPress admin, go to Plugins > Add New Plugin
  2. Search for ReformBox
  3. Click Install Now, then click Activate
  4. Open the block editor and select any supported block
  5. Enable ReformBox in the block’s settings panel (for Image blocks, use Enable Core Image Lightbox)

For Video blocks, add a poster image in the block settings before enabling ReformBox.

FAQ

Does ReformBox replace the core image lightbox?

No. core/image self-lightbox behavior is delegated to the WordPress core lightbox. ReformBox extends the surrounding workflow so images, videos, and container content can share a common modal workflow.

For images, the ReformBox sidebar toggle only updates the core lightbox.enabled setting; the clickable link behavior and overlay rendering are still handled by WordPress core.

Why does Video lightbox require a poster image?

Video self-lightbox uses the poster image as the visible in-page trigger and loads the full video inside the overlay. Without a poster image, ReformBox keeps the video lightbox toggle disabled.

How does Group split mode work?

Enable ReformBox on a Group block, then switch Display Mode to Split. Inside that parent Group, set direct child Group blocks to Preview, Modal, or Preview + Modal (Both) in the sidebar.

Preview content is rendered in-page, Modal content is rendered inside the lightbox overlay, and unassigned child Groups (none) are rendered in both. If modal content is still empty, ReformBox automatically falls back to Preview content.
Slot Type controls are shown only on direct child Group blocks of the split parent.

Where can I change ReformBox overlay appearance?

Open Settings > ReformBox in WordPress Admin. You can set the ReformBox overlay background color and opacity there.
The same settings screen is also linked from the plugin row action (Plugins > ReformBox > Settings).

Reviews

March 26, 2026
段落、動画、グループブロックにもLightboxを拡張できて凄い!! かゆいところに手が届くシンプルで素敵なプラグインです!
Read all 1 review

Contributors & Developers

“ReformBox” is open source software. The following people have contributed to this plugin.

Contributors

“ReformBox” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “ReformBox” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

0.3.5

  • Preserved inert attributes owned by themes, WordPress core, or other plugins when a ReformBox lightbox closes
  • Expanded the focus trap to media controls, iframes, summary elements, and editable content while excluding disabled, hidden, inert, and negative-tabindex elements
  • Updated development dependencies to reduce known build-tool vulnerabilities; the distributed WordPress plugin continues to have no runtime npm dependencies

0.3.4

  • Verified against WordPress 7.1 and updated the tested-up-to version
  • Made the page behind an open lightbox inert, so screen readers and keyboard focus stay inside the dialog (same approach as the core image lightbox)
  • Fixed the overlay opacity setting being ignored on pages that also load core’s image lightbox styles; video overlays could turn fully opaque there
  • Fixed lightbox dialogs being nearly edge-to-edge on phone widths; the gutter is now a consistent 16px at every viewport width
  • Fixed short content collapsing into a very narrow dialog box
  • Added WordPress 7.1’s wp-lightbox-close-button class to the close button so it keeps matching the core lightbox design

0.3.3

  • Unified ReformBox overlay controls into a single background color + opacity setting
  • Improved consistency of overlay background rendering across ReformBox lightboxes
  • Kept WordPress core lightbox appearance override separate from ReformBox overlay controls

0.3.2

  • Improved overlay styling and close behavior to avoid unintended interactions with page content and WordPress core lightbox instances

0.3.1

  • Clarified Image and Video lightbox behavior in the plugin documentation

0.3.0

  • Improved internal code quality and release preparation for the plugin

0.2.0

  • Added Group split mode and refined lightbox behavior for content and media blocks

0.1.0

  • Initial release
  • Group block as lightbox container
  • Image/Video block self-lightbox
  • Paragraph block as self-lightbox
  • Core-aligned zoom animation
  • Keyboard and accessibility support