23 lines
1.2 KiB
Markdown
23 lines
1.2 KiB
Markdown
---
|
|
tip_number: 43
|
|
date: 2026-07-24
|
|
category: visual
|
|
status: pending
|
|
---
|
|
|
|
# Tip #43 — Lightbox for item images
|
|
|
|
**Date:** 2026-07-24
|
|
**Category:** visual
|
|
**Source:** MC-Survival Wiki Daily Tip (cron @ 18:00 MESZ)
|
|
|
|
## Lightbox for item images
|
|
|
|
A lightbox opens a high-resolution version of an item image in a Radix Dialog modal, with the full description and a row of related recipes, plus keyboard arrow navigation between items. It solves the 'icons are too small to see' problem on dense item pages, where a 32x32 pixel thumbnail hides the visual details that make items recognizable. The signal is interaction analytics: image clicks on the item grid are already common, but today they do nothing — a lightbox turns those dead clicks into a richer browsing experience. Using Radix Dialog (already a dep) means no new modal library, and arrow-key navigation inside the lightbox is the small touch that makes it feel like a real gallery rather than a popup.
|
|
|
|
## Implementation tips
|
|
|
|
1. Click an item image → modal with the high-res version, full description, and 'related recipes'.
|
|
2. Use Radix Dialog (already a dep) — don't introduce a new modal library.
|
|
3. Add 'next/prev' keyboard arrows inside the lightbox for browsing related items.
|