JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.css"
/>
</head>
<body>
<div>
<a
data-fancybox="gallery"
href="https://lipsum.app/id/2/1600x1200"
data-caption="Optional caption,<br />that can contain <em>HTML</em> code"
>
<img src="https://lipsum.app/id/2/200x150" width="200" height="150" alt="" />
</a>
<a data-fancybox="gallery" href="https://lipsum.app/id/3/1600x1200">
<img src="https://lipsum.app/id/3/200x150" width="200" height="150" alt="" />
</a>
<a data-fancybox="gallery" href="https://lipsum.app/id/4/1600x1200">
<img src="https://lipsum.app/id/4/200x150" width="200" height="150" alt="" />
</a>
</div>
<script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.umd.js"></script>
<script>
Fancybox.bind('[data-fancybox="gallery"]', {
//
});
</script>
</body>
</html>