Captions are supported out of the box, simply add new element to your container and use f-panzoom__caption class name.
If you want to enable text selection in the caption (or any other element inside container), add data-selectable data attribute.
html
<divclass="f-panzoom"id="myPanzoom"> <imgclass="f-panzoom__content"src="https://lipsum.app/id/15/1600x1200" /> <divclass="f-panzoom__caption"data-selectable> Lorem ipsum dolor sit amet, consectetur adipiscing.<br /> Quisque eu ornare ante, et gravida mauris. </div></div>
Lorem ipsum dolor sit amet, consectetur adipiscing. Quisque eu ornare ante, et gravida mauris.