Popup windows

Modals, dialogs, popups, etc... These are the widget that displays an overlaid window with content in it like more info, a form, or media.

You can add the "use-ajax" class, and some parameters to an internal link to open it in a modal window. You can do this with views, a field template, preprocessor, or custom field formatter. https://www.drupal.org/docs/drupal-apis/ajax-api/ajax-dialog-boxes

Here is a modal link for this page. (It doesn't work because the drupal ajax library is not loaded).

Drupal uses jQuery UI Dialog, using the data-dialog-type attribute to declare it a modal or dialog. The distinction being a modal blocks interaction with the underlying page and a dialog allows it (according to the docs).

Libraries

There's a million js libraries for modals, dialogs, lightboxes, slideshows, etc. Do we use the popular jquery plugins, or new vanilla js ones? Should we just use the drupal native dialog?

A lightbox is considered a gallery of images that you can click on to view as a slideshow. There are also standalone slideshow libraries, aka "slider" or "carousel".

Colorbox comes up as a popular module, it's recommended at the top of the lightbox module comparison. However, it's still a jQuery plugin. In my opinion, the default styles are outdated, and it's worth looking at newer solutions.

Lightbox2 is another old popular one, but it's only available for Drupal 7.

Photoswipe, BaguetteBox and GLightbox seem to be the ones with compatible Drupal 10 modules, and are all using vanilla js.

Modules

View PhotoSwipe - Responsive JavaScript Modal Image Gallery on Drupal.orgPhotoSwipe - Responsive JavaScript Modal Image Gallery
A modern js image slideshow library.

View baguetteBox.js on Drupal.orgbaguetteBox.js
baguettebox.js integration.

View GLightbox on Drupal.orgGLightbox
glightbox.js integration.

View Dialogs on Drupal.orgDialogs
Add query parameter to link url to open in a dialog.

View NG Lightbox on Drupal.orgNG Lightbox
Specify link paths to automatically open in a dialog.

View Modal on Drupal.orgModal
Create content to show in a modal.

View Entity Overlay on Drupal.orgEntity Overlay
Display content entities in an overlay.

View Entity Popin on Drupal.orgEntity Popin
Display referenced content in dialog (similar as above).

Tags