Did you know?dyk.si

Lightbox

Click an image and it enlarges over a dimmed page, with arrows to move between photos.

<dialog> + <img>

When to use it

For photo galleries and products that need detail.

Common mistake

Don’t open it for images that gain nothing from enlarging.

Accessibility

Close on Esc, trap focus, and give every image alt text.

Name in code

HTML/CSS<dialog> + <img>
Reactyet-another-react-lightbox
Jetpack ComposeDialog + HorizontalPager
SwiftUI.fullScreenCover + TabView

Ready prompt for your coding agent

Add a Lightbox to this screen. What it is: Click an image and it enlarges over a dimmed page, with arrows to move between photos. Implement with: <dialog> + <img> (HTML/CSS). Accessibility: Close on Esc, trap focus, and give every image alt text. When to use it: For photo galleries and products that need detail. Avoid: Don’t open it for images that gain nothing from enlarging. Reuse the project's existing design tokens, spacing and component conventions.

Or compose a whole page from this element and others →

Prompts are in English for the most precise results with coding agents.