About
A fullscreen overlay for viewing images and videos at full resolution. Supports single-item and gallery modes with prev/next navigation and swiping, optional zoom and pan for images, and native video controls. Astryx by Meta. Source: https://astryx.atmeta.com/components/Lightbox
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Astryx Lightbox to your project and fits it to your theme.
Code
How Astryx Lightbox is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
'use client';
/* Copyright (c) 2026 Meta Platforms, Inc. See MIT notice in astryx-lightbox.tsx. */
import {useState} from 'react';
import {Lightbox} from '@/components/ui/astryx-lightbox';
function LightboxShowcase() {
const [isOpen, setIsOpen] = useState(false);
return (
<>
<button onClick={() => setIsOpen(true)}>View image</button>
<Lightbox
isOpen={isOpen}
onOpenChange={setIsOpen}
media={{
src: 'https://cdn.21st.dev/assets/mirror/38/387ca9dada3bc020ee335bfae84c266dbb6b2340279c5c3db15d484d7b72c83f.png',
alt: 'Coastal shoreline with ocean waves',
caption:
'A scenic coastline with waves rolling onto a sandy beach beneath a clear sky.',
}}
/>
</>
);
}
export default function Demo() {
return (
<div data-astryx-theme="neutral" data-theme="light" style={{display: 'grid', minHeight: '100vh', placeItems: 'center', padding: 24}}>
<div style={{width: '100%', maxWidth: 400}}>
<LightboxShowcase />
</div>
</div>
);
}















