🔎 🏞 The original medium.com-inspired image zooming library for React (since 2016)
<ZoomContent>
(issue #332)wrapElement
prop to API; only supports 'div' | 'span'
(issue #356)prefers-reduced-motion: reduce
(issue #359)classDialog
string prop to account for the loss of granular styling
control over different modals resulting from moving the <dialog>
rendering
to a portal<dialog>
in a portal because of #356
.my-class [data-rmiz-modal] {}
to change the <dialog>
styles, please use the classDialog
prop to pass my-class
to the
<dialog>
. I wish I didn't have to do this, but this is something that
needs fixing, and I can't justify a new major version just because of this
new style requirement. The classDialog
addition (mentioned above) should
solve this nicely.wheel
event instead of scroll
to detect trying to leave the
modal (issue #350)scrollableEl
that has arguably not ever worked (issue #350)Closes #164, #166, #213, #227, #259, #265, #281, #282
IconUnzoom
and IconZoom
in order to customize the zoom & unzoom buttonszoomImg
to provide attributes for an image that should be loaded on zoom<img />
, including all object-fit
values, any object-position
,
and loading="lazy"
<div>
and <span>
with any background-image
,
background-size
,
and background-position
<picture>
with <source />
and <img />
<figure>
with <img />
"type": "module"
in package.json
for ESModule usagecloseText
to a11yNameButtonUnzoom
openText
to a11yNameButtonZoom
querySelector
criteria to be found:
':is(img, svg, [role="img"], [data-zoom]):not([aria-hidden="true"])'
focus-options-polyfill
dependencytslib
dependencyoverlayBgColorStart
(now specified via CSS: [data-rmiz-modal-overlay="hidden"]
)overlayBgColorEnd
(now specified via CSS: [data-rmiz-modal-overlay="visible"]
)portalEl
transitionDuration
(now specified via CSS: [data-rmiz-modal-overlay]
and [data-rmiz-modal-img]
)wrapElement
wrapStyle
zoomZIndex