Skip to content

Support zoom on custom slide types #408

Merged
igordanchenko merged 1 commit into
mainfrom
feat/custom-slides-zoom
Apr 10, 2026
Merged

Support zoom on custom slide types #408
igordanchenko merged 1 commit into
mainfrom
feat/custom-slides-zoom

Conversation

@igordanchenko
Copy link
Copy Markdown
Owner

@igordanchenko igordanchenko commented Apr 10, 2026

Add supports and maxZoom props to the Zoom plugin to enable zoom on non-image slide types. Image slides continue to work as before.

Fix #407

Description

  • Add supports prop to specify which custom slide types should be zoomable (e.g., supports: ["custom-slide"])
  • Add maxZoom prop (number or per-slide function) to control the maximum zoom level for custom slides (default: 8)
  • Custom slide content is automatically wrapped in the zoom container, inheriting all existing zoom gestures (pinch, double-click, scroll, keyboard)
  • Content dimensions are measured via ResizeObserver for proper offset clamping

Checklist

Add `supports` and `maxZoom` props to the Zoom plugin to enable zoom on
non-image slide types. Image slides continue to work as before.
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 10, 2026

npm i https://pkg.pr.new/yet-another-react-lightbox@408

commit: e6f61a4

@igordanchenko igordanchenko added the enhancement New feature or request label Apr 10, 2026
@realrnvr
Copy link
Copy Markdown

Hello @igordanchenko,
Thank you so much for this!

I have checked the new feat on my end, it is working absolutely fine!

@igordanchenko igordanchenko merged commit 2861732 into main Apr 10, 2026
13 checks passed
@igordanchenko igordanchenko deleted the feat/custom-slides-zoom branch April 10, 2026 17:25
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 3.31.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions Bot added the released Implemented and released label Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request released Implemented and released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Zoom] Add support for custom slide types

2 participants