AnyLumino
API referenceastryxsurfaces

Lightbox

Display one image or video, or a gallery, in an Astryx lightbox.

Astryx Props

media, isOpen, index, hasZoom, and hasAutoPlay are adapted by the named arguments above. **props keeps the wrapper forward-compatible with additional JSON-safe Astryx props.

Notes

Video media uses Astryx's native player with browser playback controls.

See Astryx component docs: https://astryx.atmeta.com/components/Lightbox.

Functions

constructor__init__(media, *, open=False, index=0, zoom=False, auto_play=False, **props) -> None
parammediaMapping[str, Any] | Iterable[Mapping[str, Any]]

One media mapping or a gallery of mappings. Every item requires src and accessible alt text; type may be "image" or "video", and caption is optional.

paramopenbool
= False

Controlled open state synchronized through is_open.

paramindexint
= 0

Controlled gallery index synchronized through value.

paramzoombool
= False

Whether images support double-click zoom and drag-to-pan.

paramauto_playbool
= False

Whether video starts playing when the lightbox opens.

parampropsAny
= {}

Returns

None

On this page