The Mini Basket is a compact and user-friendly shopping cart interface typically located in the header of a website. It provides a quick summary of the items in a user's shopping cart and can be accessed by clicking on the shopping cart icon. This feature enhances the user experience by offering quick navigation and access to cart details without navigating to a separate page.
The Mini Basket can be displayed in two styles:
Classic Style: The default compact view that opens below the shopping cart icon.
Large Sidebar Style: An expanded version that slides in from the side of the screen.
Mini Basket Classic Style
The classic style appears as a small dropdown directly below the shopping cart icon when clicked. This style is ideal for users who prefer a compact and minimalistic design, offering quick access to their cart without taking up much screen space.
The classic style is enabled by default, and no additional configuration or modifications are required to implement it.
Mini Basket Large Sidebar Style
The large sidebar style is designed to provide users with a comprehensive and detailed view of the items in their shopping cart. Unlike the compact dropdown style, this layout slides in from the side of the screen, occupying a significant portion of the viewport. It is particularly useful for users who wish to view their cart's contents in greater detail without leaving their current page.
To implement the large sidebar style, modify the return block in the MiniBasket() function in the src/views/header/mini-basket.tsx file as shown below.
Adjusting the Mini Basket Width If you need to modify the width of the large Mini Basket view, update the md:w-[38.5625rem] value in the CSS class definition.