Effects & Media /
newLightbox
Full-screen image viewer in a portal: pinch / wheel / pan zoom, swipe + keyboard navigation, thumbnails, and scroll-lock.
Examples
Controlled
Drive open/index yourself. Scroll/pinch to zoom, drag to pan, arrows/swipe to navigate, Esc to close.
Gallery + Trigger (hover overlay)
Wrap thumbnails in a gallery; each trigger opens at its index — no state wiring. Small thumbs use an icon-only overlay; larger ones add a label.
Props (core)
Gallery & Trigger
Keyboard & gestures
- ← / → navigate, Esc closes, + / − zoom, 0 resets zoom.
- Pinch (touch) and mouse-wheel zoom toward the pointer; double-click toggles zoom.
- Drag to pan while zoomed; swipe to navigate when not zoomed.
- Stacked lightboxes: only the topmost responds to keys, so Esc closes it first.
Accessibility
- role='dialog' aria-modal='true'; body scroll is locked while open.
- Focus moves into the dialog on open and returns to the trigger on close; Tab is trapped.
- Always provide meaningful alt text on items.