plugin-icon

Spinnaker Dialog Lightboxes

Accessible lightboxes for images and PDFs using the HTML dialog element. Add classes to create instant lightboxes!
Versão
1.0
Última atualização
Jan 8, 2026

A spinnaker is a special type of sail that is flown in front of the main sails. It’s packed away when not in use, but when the wind is right, it can be unfurled to provide a powerful boost. This plugin is named Spinnaker because it allows you to keep your images and PDFs neatly tucked away, ready to be “unfurled” into a beautiful, accessible lightbox when your users need them.

Spinnaker is a lightweight, modern, and highly accessible plugin that turns any image or PDF link into a fully-featured dialog lightbox. It’s built with accessibility as a priority, ensuring a seamless experience for users with keyboards and screen readers.

Image Lightbox Features:

  • Converts any <img> tag into a clickable lightbox trigger.
  • Displays a large, scrollable version of your image that fills the viewport without forcing double-scrollbars.
  • Adds scroll-arrow buttons for easy navigation of oversized images.
  • Supports custom initial image positioning (e.g., center, top, bottom, left, right).
  • Displays image credits as a “placard,” with support for links.
  • Provides a “Download” button for the full-size image.
  • Fully localizable UI text in Spanish, Russian, Vietnamese, Simplified Chinese, Arabic, Korean, and Somali.

PDF Lightbox Features:

  • Converts any <a> tag pointing to a PDF into a lightbox trigger.
  • Displays the PDF in an embedded viewer right on your site.
  • Includes a “Download” button.
  • Supports page builder modules (like DIVI) where you can only add a class to the container.
  • Tracks PDF views and downloads, with stats available in the WordPress admin.
  • Fully localizable UI text in Spanish, Russian, Vietnamese, Simplified Chinese, Arabic, Korean, and Somali.

Usage

Image Lightbox

To make an image open in a lightbox, add the class image-lightbox-trigger to the <img> tag itself.

For Gutenberg Block Editor: Gutenberg wraps images in a <figure> element. Add the class image-lightbox-trigger-container to the figure wrapper: Select the image block, open the “Advanced” panel in the block settings, and add image-lightbox-trigger-container to the “Additional CSS class(es)” field. For screen reader descriptions, you can use the image’s “Title” field (available in the image block settings). For advanced features like credits and positioning, switch to HTML editing mode.

For Page Builders (like DIVI): If you can only add a class to the container/module holding the image, add the class image-lightbox-trigger-container to the container. The plugin will find the first image inside it and turn it into a lightbox.

Optional Attributes (add to the <img> tag):

  • data-description="…": A longer description for screen readers. Note: Users of Gutenberg and other page builders that don’t allow custom attributes to be added can use the image’s “Title” field. The plugin will automatically use the title text for the screen reader description and remove the title attribute from the image to prevent duplicate announcements.
  • data-credit="…": The text for the credit placard. Requires HTML editing mode in Gutenberg.
  • data-credit-link="…": A URL to make the entire credit placard a link. Requires HTML editing mode in Gutenberg.
  • data-position="…": Set the initial scroll position. Options: top, bottom, left, right, or center (default). Requires HTML editing mode in Gutenberg.

Localization: To translate the UI text, add a language-specific class like -es (for Spanish) to the trigger class (e.g., image-lightbox-trigger-es).

  • Supported languages: Spanish (-es), Russian (-ru), Vietnamese (-vi), Simplified Chinese (-zh), Arabic (-ar), Korean (-ko), and Somali (-so).

Example HTML:

<img class="image-lightbox-trigger-es" src="…" alt="…" data-description="Una descripción detallada de la imagen." data-credit="Foto por Jane Doe" data-credit-link="[https://example.com](https://example.com)" data-position="right">

PDF Lightbox

To make a link to a PDF open in a lightbox, add the class pdf-lightbox-trigger to the <a> tag itself.

For Page Builders (like DIVI): If you can only add a class to the container/module holding the link, add the class pdf-lightbox-trigger-container to the container. The plugin will find the correct PDF link inside it.

Localization: To translate the UI text, add a language-specific class like -es (for Spanish) to the trigger class (e.g., pdf-lightbox-trigger-es).

  • Supported languages: Spanish (-es), Russian (-ru), Vietnamese (-vi), Simplified Chinese (-zh), Arabic (-ar), Korean (-ko), and Somali (-so).

Example HTML:

<a href="/path/to/file.pdf" class="pdf-lightbox-trigger-es">Directorio</a>
Gratuitono plano Business
Ao instalar, você concorda com os Termos de Serviço do WordPress.com e com os Termos do plugin de terceiros.
Testado até
WordPress 6.9
Esse plugin está disponível para download para o seu .