InventoryGrid

Grid of item slots with selection, inspired by the backpack inventory.

INVENTORY

🥕15
🪵47
🥚12
🪨23

Props

PropTypeDefaultDescription
columnsnumber12Number of columns.
rowsnumber3Number of rows.
itemsInventoryItem[]Array of { id, icon, quantity?, quality? }.
selectedIdstringCurrently selected item ID.
onSelect(id: string) => voidCalled when an item is clicked.