StealThis .dev

Game — Inventory Grid (drag · tooltips)

An RPG inventory screen with a 6x4 slot grid of CSS-drawn item icons, rarity-colored borders from common to legendary, stack counts, an equipment paper-doll (head, chest, weapon, ring), a carry-weight bar and a gold counter. Native HTML5 drag-and-drop moves, swaps and stack-merges items, drops gear into matching equipment slots with valid/invalid highlights, rich hover tooltips show name, rarity and stats, and right-click instantly uses or equips. Includes sort-by-rarity, loot and repair actions with neon-glow toasts.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Inventory Grid (drag · tooltips)

A dark sci-fi inventory screen for the fictional Nullforge title Ashen Vanguard. The backpack is a 6x4 grid of slots holding CSS-drawn item glyphs — swords, helms, potions, gems, scrolls — each framed by a rarity-colored border and glow (common, uncommon, rare, epic, legendary), with Orbitron stack counters on stackables. Beside it sits an equipment paper-doll with head, chest, weapon and ring slots that feed a live Power / Armor / Crit stat readout, plus an animated carry-weight bar that shifts from cyan to amber to red as you approach capacity, and a gold purse in the header.

Everything is wired with native HTML5 drag-and-drop: drag items between bag slots to move or swap them, drop matching stacks to merge them, and drag gear onto its equipment slot — valid targets light up cyan while invalid ones flash red. Hovering (or keyboard-focusing) any item raises a rarity-tinted tooltip with type, stat lines and flavor text; right-clicking uses a consumable, equips gear, or unequips from the doll, with Enter / E as the keyboard equivalent.

The footer adds a clip-cornered neon CTA to loot random items (stacking where possible), a repair action that deducts gold, and a sort button that reorders the bag by rarity then name. Every action confirms itself through sliding toasts, and the layout collapses gracefully down to a 4-column grid on narrow phones.

Illustrative UI only — fictional games, studios, characters, and data. Not engine integrations.