Light Modal Block


A simple yet robust solution for creating modals within the WordPress block editor.

🚀 View Demo


  • Fully customizable using the native block editor style controls
  • Trigger modal on click for any element via CSS selector
  • Trigger modal on page load after X milliseconds
    • Set cookie to not show modal again on page load until X minutes have elapsed
  • Custom modal width
  • Optional close button
  • API enabled
  • Only 2kb gzipped
  • Accessibility enabled


The Light Modal block uses a modified version of the Micromodal library.

لقطات الشاشة

  • Block editor modal settings
  • Show Modal block control enabled under the Advanced panel for various blocks
  • Native block styling enabled for modals
  • Custom panel reveals all modals enabled on page
  • Modal in list view


تقدّم هذه الإضافة مكوّن واحد (1).

  • Light Modal Block Lightweight, customizable modal block for the WordPress block editor


  1. Upload the plugin files to the /wp-content/plugins/light-modal-block directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress

الأسئلة المتكررّة

How can I programatically open or close a modal?

Each modal is given a unique ID, which can be found inside the inspector controls of the block settings. It will look something like: Mk6I8L4haJB

To open a modal:



To close a modal:




لا توجد مراجعات لهذه الإضافة.

المساهمون والمطوّرون

“Light Modal Block” هو برنامج مفتوح المصدر. وقد ساهم هؤلاء الأشخاص بالأسفل في هذه الإضافة.


ترجمة ”Light Modal Block“ إلى لغتك.

مُهتم بالتطوير؟

تصفّح الشفرة، تحقق من مستودع SVN، أو الاشتراك في سجل التطوير بواسطة RSS.

سجل التغييرات

= 1.2.1=

  • Fix: Modal blocks not showing in sidebar or advanced controls if a nested block


  • Enhancement: Add typography style controls


  • Fix: Block editor toolbar crash


  • Fix: Add backdrop color control
  • Enhancement: Set cookie to not display modal again until X minutes have elapsed
  • Enhancement: API to programatically open and close modal


  • Fix: Update CSS styling


  • Initial release