Skip to content

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

PropTypeDefaultDescription
props.idstringRequiredProvide a stable, unique ID for this lightbox.
props.itemsreadonly LightboxItem[]RequiredSupply the ordered media metadata. Render the corresponding images, videos, or models in the view.
props.label / carouselLabelstringRequiredName the dialog and the carousel for assistive technology.
props.open / valueboolean / numberUncontrolledControl whether the lightbox is open and which zero-based item is selected.
props.defaultOpen / defaultValueboolean / numberfalse / 0Set the initial open state and item index in uncontrolled mode.
props.optionsLightboxOptions—Configure looping, preload, zoom, gestures, direction, and shared-element transitions.
props.closeLabel / previousLabel / nextLabel / zoomInLabel / zoomOutLabel / thumbnailsLabelstringBuilt-in labelsOverride the accessible names of the controls and thumbnail list.
viewHeadless parts rendererRequiredCompose the trigger, portal, native dialog, controls, and slides. Keep the portal inside the root in the view.
onEmitLightboxEvent mapping—Handle open and item changes, zoom, animation completion, or failures.

Photos app

Library48 Photos · July 2024

Photos app (RTL)

Library48 Photos · July 2024

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

4.96128 reviewsMarbella, Spain

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.

Shareable albums

Every photo in this journal has its own link, and all six albums share one lightbox. Open a photo, copy its link, or reload. Back and Forward follow the photo links across albums.

Above the clouds
Noa Brandt · Dolomites, Italy · 2 days ago
Forest mornings
Theo Lindqvist · Bavarian Forest, Germany · 5 days ago
Doors of the old town
Inês Duarte · Porto, Portugal · 1 week ago
Coastline
Malia Kekona · Big Sur, California · 2 weeks ago
Fog days
Jun Mori · Hokkaido, Japan · 3 weeks ago
Concrete and colour
Sam Okafor · Rotterdam, Netherlands · 1 month ago

Shared lightbox

A group chat with a thousand messages and one lightbox. Each thumbnail opens its message’s photo gallery. The feed only mounts nearby rows, and the viewer brings a scrolled-away thumbnail back before it closes.

Lisbon trip
5 people · 1,000 messages · 673 photos
can you send the originals
did you see the light this morning
we should go back there in spring
which one is your favourite?
sure, give me a sec
wait how did you get that angle
Jules Martin
wait how did you get that angle
Jules Martin
look at this
Jules Martin
yes!!
Jules Martin
we should go back there in spring
Jules Martin
ok these are unreal
12 of 1000 rows mounted

Infinite scroll

Feed12 photos loaded · scrolls forever

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.

Foggy pine ridge at dawnEmpty coastal highwayNarrow sunlit alleyWide desert dunesCalm lake reflectionTall concrete staircasePanoramic city skyline at duskSingle tree in a green field

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.

Today at 11:11 AM
some imgs
3 attachments

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'.

Now Streaming

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.

Object studio

Khronos sample assets

Open any model. Orbit stays in sync with the grid tile.

Materials Variants Shoe
Leather · multi-variant
Damask Chair
Purple & gold fabric
Water Bottle
Brushed metal
Damaged Helmet
Sci-fi prop