djentlee (@djentlee) profile picture
Joined January 2024
Photo by djentlee (@djentlee)Photo by djentlee (@djentlee)Photo by djentlee (@djentlee)Photo by djentlee (@djentlee)Photo by djentlee (@djentlee)Photo by djentlee (@djentlee)Photo by djentlee (@djentlee)Photo by djentlee (@djentlee)Photo by djentlee (@djentlee)Photo by djentlee (@djentlee)
2. Learn the fundamentals (grids, spacing etc.)
1
25
3. Find a design you like and rebuild it in Figma
20
We loop through the brands and display their names. flex flex-wrap → Ensures brands wrap onto new lines if needed. group → Enables hover effects for child elements. {index < brands.length - 1 ? "," : ""} → Adds commas except on the last item.
18
Now, we’ll create a 12-column grid where the image will be displayed dynamically. grid grid-cols-12 → Defines a 12-column grid. col-span-2 → Image takes up 2 columns. col-start-4 → Image starts at column 4.
1
18
We need a way to track which brand is hovered so we can update the image dynamically. Use useState to store the selected brand. brands[0].name → Default brand is the first in the array. Why useState? It allows the UI to update instantly when a brand is hovered.
16