About
An accessible image preview that expands from its thumbnail and returns to the same spatial origin when dismissed.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Lightbox to your project and fits it to your theme.
Code
How Lightbox is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import Lightbox from "@/components/ui/sona-lightbox"
export default function LightboxDemo() {
return (
<Lightbox
alt="Accordion component preview on a dark canvas"
caption="Select the backdrop, close button, or press Escape to return."
className="aspect-[16/10] w-full max-w-xl"
src="https://cdn.21st.dev/assets/mirror/81/81c66ff390cee34c0ec35bab9bd52846ab6e6c38560e1e70f7f752b1e7b70659.png"
/>
);
}








