5.2.0
New Feature: Lightbox
Any element in your presentation can now be turned into an image/video lightbox trigger. Clicking reveals a full-size lightbox overlay where users can view your image or video. This is great for things like clickable thumbnails in a gallery.
<!-- Click to show "A.png" in an overlay -->
<img src="A.png" data-preview-image>
<!-- Click show "B.png" in an overlay -->
<img src="A.png" data-preview-image="B.png">
<!-- Click to show "C.mp4" in an overlay and scale it to "cover" -->
<img src="A.png" data-preview-video="C.mp4" data-preview-fit="cover">
<!-- Works with any element type -->
<button data-preview-video="C.mp4">Play video</button>
Docs: revealjs.com/lightbox.
Here's what it looks like in action:
https://github.com/user-attachments/assets/3d7d5885-8099-412c-b26d-ef294adbbb3d
Changes
- Upgrade to gulp 5.0.
- Add
controls: "speaker-only"config option for only showing controls in speaker view (@gpotter2 in https://github.com/hakimel/reveal.js/pull/3716) - Extend search API to include
closeSearchandtoggleSearch(@lechten in https://github.com/hakimel/reveal.js/pull/3685) - Automatic source code spellcheck via GitHub action (@yarikoptic in https://github.com/hakimel/reveal.js/pull/3602)
- Math plugin now ignores
codetags by default (@hakimel in 0d02d8a303a39b02c919d86c94ec477d1e1b107d) - Muted background videos now autoplay in the speaker view.
- Prevent
initializefrom being called twice (@hakimel in 16ac4b00671a8ac6433091118c4ebd9b00255545) - Auto-animate no longer skips matching fragments on adjacent slides (@hakimel in 6dea2a50941bf3be6824b3eadc5cb17feb87eb5b)
Bug fixes
- Fix reveal.js not covering full viewport height in iOS by switching to
100dvh(@hakimel in 6cebb771eec18e244a23719f94baf0e70242abe7) - Fix background video restarting when switching fragments from notes view (https://github.com/hakimel/reveal.js/issues/3633)
- Fix gulp package not working in gulp 5 (@dennybiasiolli in https://github.com/hakimel/reveal.js/pull/3701)
- Fix last slide not triggering
slidechangeevent in scroll view (@hakimel in fe4a6e82b01df923085fa867656cf11180490465)
Full Changelog: https://github.com/hakimel/reveal.js/compare/5.1.0...5.2.0