An editorial e-commerce homepage for a fashion store, built with Bootstrap 6 for a fictional label called Maison Vale, with category tiles, filterable new arrivals, a working shopping bag, a sale countdown, reviews and a newsletter signup.
How it works
The page lives in .mv-page, which pins data-bs-theme="light" and maps the Bootstrap 6 primary role (--bs-primary-bg, --bs-primary-contrast and friends) to the brand clay. Dark buttons use the built-in theme-inverse role.
- Announcement bar and navbar:
navbar lg:navbar-expandlaid out as a three-column grid: links on the left, the centered.mv-brandlogo, and icon actions on the right. Below 1024px the links move into a<dialog class="drawer drawer-start">. "Women" opens a.menuwithmenu-headergroups. - Hero and categories: a serif headline, a two-photo lookbook (
.mv-look) and four category tiles. - New arrivals:
.chipbuttons withdata-mv-filterhide or show cards by theirdata-mv-catand announce the count in a live region. Heart buttons usedata-bs-toggle="button", and each.mv-addbutton adds the product to the bag and shows#mv-toast. - Shopping bag:
#mv-bagis a<dialog class="drawer drawer-end">. The script builds the list from thedata-mv-name,data-mv-priceanddata-mv-imgattributes, with quantity buttons, remove links, the subtotal, the badge count and a free-shipping progress bar. - Search:
#mv-searchis a<dialog class="dialog dialog-lg">with aform-adornfield; typing or clicking a popular chip lists matching products. - Sale banner: the countdown always runs to the coming Sunday at 23:59 local time, so it never shows a stale date. The code button copies
KNIT10, with a fallback message when the clipboard is blocked. - Reviews and newsletter: review cards, then
<form data-bs-validate novalidate>with a simulated submit.
Customization
- Change
--mv-clay,--mv-inkand--mv-boneon.mv-pageinstyle.cssto rebrand; update the--bs-primary-*overrides next to them. - Change
FREE_SHIPPINGat the top ofscript.jsto move the free-shipping threshold. - Edit the starting
bagMap inscript.jsto start empty or with other products. - Add products by copying a
.mv-productcard and settingdata-mv-id,data-mv-name,data-mv-priceanddata-mv-cat. - Replace the
saleEnd()function with your real sale end date. - Replace the
setTimeoutin the newsletter handler withfetch()to your email provider. - The photos come from Unsplash; replace them with your own product and campaign photos.
Accessibility
A skip link jumps to #mv-main. Filter chips use aria-pressed, the bag button label includes the item count, quantity controls have labels, focus stays in the bag after changes, and toasts use role="status". The countdown is a role="timer", star ratings have text labels, and hover-only effects stop under prefers-reduced-motion.
Bootstrap 6 notes
Built on Bootstrap 6.0.0-alpha.1 (alpha APIs can still change). BS5 developers will notice: btn-solid theme-inverse and btn-outline replace btn-dark, the navbar and cart use Drawer instead of navbar-collapse and Offcanvas, Dropdown is now Menu, Modal is now Dialog, the badges use badge theme-inverse, and validation uses data-bs-validate.