# Lightbox

> Aegis enhances the WordPress Image block lightbox (core/image with Expand on click). The lightbox itself is Core. Toggles at Aegis → Blocks → Lightbox add extras on top.

The lightbox is **off by default**: `theme.json` sets `settings.lightbox.enabled` to `false`. Turn **Expand on click** on for an individual image in the editor, or switch the Lightbox on for the Image block in Global Styles to enable it for every image.

The overlay scrim and close/prev/next controls follow the active color scheme (light or dark) using `--wp--custom--body--background` and `--wp--custom--body--color`. Changing the site background or text color in the Site Editor updates those tokens. Core bakes a light-mode hex into the overlay HTML; Aegis overrides it so dark mode is not stuck on the light surface.

Image captions stay on the figure in the content. They are not shown in the lightbox overlay.

## Feature Toggles

Features are off by default when Aegis Dash is active. Enable All on the Lightbox section, or turn on individual extras:

![Aegis → Blocks with the Lightbox section open, showing the four lightbox feature toggles.](https://www.atmostfear-entertainment.com/wp-content/uploads/2026/11/blocks-lightbox.png)

*Lightbox toggles in Aegis → Blocks.*

| Toggle | What it adds |
| --- | --- |
| Gallery Navigation | Treats lightbox images in the same Group, Row, Stack, Column, or Gallery as a set. Shows Core prev/next arrows and allows arrow-key navigation. |
| Zoom | Double-click, scroll wheel, and pinch-to-zoom with pan on the enlarged image. Clicking the image while zoomed does not close the overlay; swipe is paused while zoomed. |
| Thumbnail Strip | Thumbnail row when a grouped set has **4 or more** images. |
| Swipe Gestures | Groups sibling lightbox images so Core’s touch swipe can move between them. Core arrows stay hidden unless Gallery Navigation is also on. |

Slider lightbox (`slider_lightbox`) is a separate Pro feature on the Slider block, not this section.

## Requirements

- WordPress Image lightbox (Expand on click) enabled on the image.
- Linked images (`linkDestination` other than none) do not use Core lightbox; Aegis extras do not apply.
- SVG Image variation (`is-style-svg`) is skipped.

## How grouping works

WordPress already groups images inside a **Gallery** block (Core sets `galleryId` and `data-wp-interactive="core/gallery"` on the gallery wrapper). Aegis grouping also covers lightbox images that share a Group (including Row and Stack layouts) or Column parent when Gallery Navigation, Swipe, or Thumbnails is on. Those wrappers get the same Core gallery interactivity context so prev/next, keyboard, and touch swipe work. Images in separate columns stay separate sets — use a Gallery block to group a row of images across columns.

![The lightbox open on the front end over a dimmed page, with previous and next arrows to move through a gallery.](https://www.atmostfear-entertainment.com/wp-content/uploads/2026/11/lightbox.png)

*Images in the same gallery open as one group.*

## Next Steps

- [Enhanced Core Blocks](https://www.atmostfear-entertainment.com/docs/aegis/themes/theme/enhanced-core-blocks/) — Other Image block enhancements.
- [SVG Icons](https://www.atmostfear-entertainment.com/docs/aegis/themes/theme/svg-icons/) — Icons use `core/icon`, not Image.
- [Aegis Dash Custom Blocks](https://www.atmostfear-entertainment.com/docs/aegis/plugins/dash/custom-blocks/) — Block feature toggles.

---

Source: https://www.atmostfear-entertainment.com/docs/aegis/themes/theme/lightbox/ · Updated 2026-11-22
