هل تعلم؟dyk.si

معرض الصور المكبّر Lightbox

عند النقر على صورة تكبر في منتصف الشاشة وتُعتَّم الصفحة خلفها، مع أسهم للصورة التالية.

<dialog> + <img>

متى تستخدمه

لمعارض الصور والمنتجات التي تحتاج إلى عرض التفاصيل.

خطأ شائع

لا تفتحه لصور صغيرة لا تستحق التكبير.

إمكانية الوصول

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

اسمه في الكود

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

برومبت جاهز لوكيل البرمجة

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.

أو ركّب صفحة كاملة من هذا العنصر وغيره →

البرومبت بالإنجليزية لأنها الأدق مع Claude Code وأمثاله.