Gallery
A grid of photos with captions. Click a photo to replace it or add another.
Use this element#
Replace each photo and edit its caption on the page. Use Photos to add, reorder, and remove whole figures. Choose Grid, Larger, or First larger when the section allows its own arrangement.
Larger on click applies the gallery’s lightbox behavior to its photos. Review the full-size image, caption, keyboard controls, and close action in the visitor view. Keep image file sizes appropriate for the page.
Availability#
Available through the appropriate content or section picker when the theme and editing context allow it.
Content controls#
These are the controls registered for this element. A control that depends on another setting or the surrounding layout appears only when it applies.
Layout#
| Choice | Stored value |
|---|---|
| Grid | (empty/default) |
| Larger | layout-large |
| First larger | layout-feature |
This control is conditional on the element’s current state or layout. A hidden control does not indicate that its stored value has been deleted.
Larger on click#
Turn this option on or off. The label describes the behavior being enabled.
Photos#
Use Add a photo to create a complete item. The collection manages its content and structural wrapper together.
Min: 1.
Each item exposes: Caption. Rich content can also be edited directly on the page.
The item includes a picture that can be replaced through the image controls.
Style controls#
In Developer mode, Style starts with this element's own group, Gallery, open above the shared Style groups (available in 0.9.15 and later):
| Control | Value |
|---|---|
| Space between photos | Size in px, rem or em |
| Caption color | Color |
Each works like the rest of the inspector: it starts by showing the element's current look, Reset brings the theme's value back, and each change is one Undo step. Like other Style settings, a value can differ by screen size and state (Normal, Hover, Focus).
Save and check#
- Change one setting and inspect the affected element.
- Use Undo and Redo to check the edit is reversible.
- Save a draft, reopen it, and confirm the content and choices remain.
- Inspect the page at desktop and phone widths.
- Publish only when the result is ready. For interactive elements, check the visitor view because editing mode can suppress interaction.
How it is stored#
The block comes from blocks/40-gallery.html. Its editable content is HTML in the page or owning template. Native settings update words, attributes, classes, or supported style properties. Generated interface controls are not saved into that HTML.
The settings registry matches .cb-gallery in assets/element-settings.js. Public behavior, when needed, is implemented by the native element runtime in assets/elements.js or assets/blocks.js.