An open source design system that's fully customizable and agent ready
TypeScript
// Copyright (c) Meta Platforms, Inc. and affiliates.
import {useState} from 'react';
import {Lightbox} from '@astryxdesign/core/Lightbox';
export default function LightboxShowcase() {
const [isOpen, setIsOpen] = useState(false);
return (
<>
<button onClick={() => setIsOpen(true)}>View image</button>
<Lightbox
isOpen={isOpen}
onOpenChange={setIsOpen}
media={{
src: '/template-assets/light-scene-horizontal-1.png',
alt: 'Coastal shoreline with ocean waves',
caption:
'A scenic coastline with waves rolling onto a sandy beach beneath a clear sky.',
}}
/>
</>
);
}