Lightbox
Open photos, videos, and 3D models in a shared viewer with zoom and gallery navigation.
Installation
Install Lightbox from the Fluid Effect UI registry.
Basic
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
props.id | string | Required | Provide a stable, unique ID for this lightbox. |
props.items | readonly LightboxItem[] | Required | Supply the ordered media metadata. Render the corresponding images, videos, or models in the view. |
props.label / carouselLabel | string | Required | Name the dialog and the carousel for assistive technology. |
props.open / value | boolean / number | Uncontrolled | Control whether the lightbox is open and which zero-based item is selected. |
props.defaultOpen / defaultValue | boolean / number | false / 0 | Set the initial open state and item index in uncontrolled mode. |
props.options | LightboxOptions | — | Configure looping, preload, zoom, gestures, direction, and shared-element transitions. |
props.closeLabel / previousLabel / nextLabel / zoomInLabel / zoomOutLabel / thumbnailsLabel | string | Built-in labels | Override the accessible names of the controls and thumbnail list. |
view | Headless parts renderer | Required | Compose the trigger, portal, native dialog, controls, and slides. Keep the portal inside the root in the view. |
onEmit | LightboxEvent mapping | — | Handle open and item changes, zoom, animation completion, or failures. |
Photos app
Photos app (RTL)
Curated grid
A vacation-rental listing whose cover grid shows the host’s five picks out of a 21-photo tour. The five cover photos close onto their own tiles. The last tile lists every off-page photo in overflowItemIds, so those photos close onto it with a crossfade.
Casa Alba, a whitewashed villa above the bay
Entire villa hosted by Claire
10 guests · 5 bedrooms · 6 beds · 4.5 baths
- Heated infinity pool
- Primary suite with sea view
- Freestanding soaking tub
- Fast wifi, 600 Mbps
- Great for families
Set on a quiet hillside ten minutes from the old town, Casa Alba opens onto a pool terrace with views across the bay. Inside, a double-height lounge, a kitchen built for long dinners, and five bedrooms spread over two floors.
Infinite scroll
URL-synced state
Every photo in this masonry wall has its own URL. Tapping a tile opens the viewer and adds the photo to the address. Swiping updates that same history entry, and Back returns to the gallery. Opening a photo URL directly renders the gallery with the lightbox already open on the server. Effect UI keeps the photo and viewer state in sync with the browser history.
Intercepted routes
Each photo has one URL and two presentations. Follow a link from the gallery to open a lightbox over the grid. Visit that URL directly or reload it to see a standalone photo. Browser Back returns to the gallery. Compare this with URL-synced state, which opens the same gallery and viewer on a direct visit.
Text message
A single Trigger wraps an entire stack of attachments. Paired with morphTo: 'origin', the close animation always returns to the stack no matter which attachment is active.
Film trailers
Each poster is its own Lightbox with a single-item gallery and video media. crossfade: 'close' hard-cuts the open morph into the video and dissolves the live frame back into the poster on close. Video autoplays (muted) only after phase === 'Open'.
Blender Open Movies
Four Creative Commons shorts from the Blender Foundation. Click any poster to watch fullscreen.
3D models
Each tile has its own lightbox and a Three.js canvas. Rotate a model in the viewer and its orientation carries back to the tile.
Khronos sample assets
Open any model. Orbit stays in sync with the grid tile.







