<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5HGSQD2L" height="0" width="0" style="display:none;visibility:hidden" title="GTM"></iframe>

Lightbox

A dedicated full-screen modal component designed for focused media display.
styleKeys: lightbox

Use Lightbox...

  • To provide a full-screen, distraction-free environment for inspecting media content (such as images, carousels, or videos).
  • In flows where a small image preview needs to open into a larger, more detailed, immersive view

Don’t use Lightbox...

  • When you need to show non‑media or mixed content (for example, long text, forms, or layouts where images are just one part of the UI), use ModalDialog instead.
  • When the content would not benefit from a full‑screen, immersive, media‑first presentation.

Trigger

With Zoomable Image

Use ZoomableImage as the trigger to open the image in a Lightbox when you want to provide a second level of zoom for detailed inspection at higher magnification.

The preview has been updated.

Use ZoomableImage inside the Adaptive carousel as the trigger to open the same Adaptive carousel in a Lightbox, providing a second level of zoom for detailed, high‑magnification inspection.

To keep the active slide in sync between the page carousel and the Lightbox carousel, pass the active slide number into the Lightbox carousel via the initialSlide prop. This ensures the Lightbox opens on the same active slide on which the user triggers the Lightbox.

The preview has been updated.

With External Trigger

When you want the Lightbox to be opened by a control that is separate from the image itself, or you can’t use the image (or carousel slide) as a clear, tappable trigger (for example, because it’s too small), use an external trigger instead. In these cases, provide a separate, clearly identifiable control to open the Lightbox.

The preview has been updated.

Accessibility

Use the aria-label prop to provide a descriptive name for the Lightbox (e.g., "Product Image Gallery").

Content

  • When opening a Lightbox from an AdaptiveCarousel, keep the active slide in sync. The Lightbox should open on the same slide the user selected in the main carousel to preserve context and continuity.

Complexity and flow

  • Avoid nested modal dialog. Do not open additional modals from within a Lightbox.

Props

Lightbox
This component is implemented using the <dialog /> as the root element. You can utilize the native attributes supported by <dialog /> tag.
See core props for additional props that can be applied to this component.
proptyperequireddescriptiondefault
onRequestDismiss() => voidtrue
Callback function which will be invoked when the modal wants to be dismissed.
null
isOpenboolean | nullfalse
Show/hide dialog
false
takeOverboolean | nullfalse
Decide whether to fill the full screen.
false
onlyRenderWhenOpenboolean | nullfalse
only renders the contents of the dialog if the modal is open this is different than native dialog behavior, where the content is rendered but hidden
false

Related