Skip to content

Lightbox

The following lightbox component is used for displaying images in a modal, and has good accessibility with keyboard. You have to pass in an array of images and set state variables to use it. You can customize it very easily via Tailwind and it’s also a single component. An example of usage is:

No extra libraries required. Assuming you have Tailwind CSS installed