Overlay captions in Starterkit album lightbox?

Maybe use the script from the getkirby.com repo instead, it has a built-in prev-next option that you can use by passing a group name to the thumbs, e.g. data-lightbox="gallery".

You can find the unminified original code of the lightbox scripts in the getkirby.com repo if you want to build on it:

Edit: I thought both scripts were identical, but they are not.

This seems to be the script used in the Starterkit (doesn’t look as if there was a lot to modify).

If you need more control or features, maybe a different lightbox library would be a better option.