This project demonstrates a responsive design implementation of a product cards layout using the following technologies:
- HTML
- JavaScript (VanillaJS)
- TailwindCSS
The task is to design a grid of product cards with the following features:
-
The product cards should be responsive and display on mobile and desktop.
-
On mobile devices, only the first 4 product cards should be visible by default. A Show More button triggers a smooth dropdown to reveal the remaining cards.
-
The hover effect on product images should swap to a secondary image.
-
The scrollbar thumb should increase to 6px in height when hovered or touched (this will require hiding the default browser scrollbar).
-
Free stock images from Unsplash are used as placeholders for product images.
- Migrate the design into a Shopify Section, using Liquid and Schema Input for a development store. This can be mocked up without a live store.
-
Responsive Design: Works seamlessly across mobile and desktop devices.
-
TailwindCSS: Utilized for utility-first CSS styling and a clean, maintainable structure.
-
Smooth Dropdown: The "Show More" button triggers a smooth dropdown on mobile.
-
Image Swap on Hover: Hovering over a product image swaps it with a secondary image.
-
Custom Scrollbar: A custom scrollbar with an increased thumb size for better user interaction.
-
Header Design
-
Product Cards Displaying Div Design
-
Show More Button Design
-
Padding, Margin, Font style for the header at desktop
-
Padding, Margin, Font style for the header at mobile
-
Layout, Padding, Margin style for the Product cards holder at desktop
-
Layout, Padding, Margin style for the Product cards holder at mobile
-
Layout, Padding, Margin style for the Product Image at desktop
-
Layout, Padding, Margin style for the Product Image at mobile
-
Layout, Padding, Margin, Font style for the Product Title, Rating and Review, Product Price at desktop
-
Layout, Padding, Margin, Font style for the Product Title, Rating and Review, Product Price at mobile
-
Desktop Style
-
Mobile Style
-
Custom scrollbar with specified color and height at Desktop
-
Custom scrollbar hidden at Mobile
- Replace images from the Unsplash as placeholder iamge
-
Assign dynamic product cards to the holder div as the template card
-
Implement Show More button behavior