Documentation
Basket — Shopping Cart Page
Version 1.0.0 · Vanilla HTML · 16 files · 122 KB
Getting started
- Unzip the download and open index.html in a browser. No server, installation or build step is needed.
- Edit the text directly in the HTML files.
- Change colours, fonts and spacing through the CSS custom properties at the top of assets/css/style.css.
- Replace the artwork in assets/images/ with your own images.
- Upload the whole folder to any static host.
File structure
The download contains these 16 files:
- LICENSE.txt1.3 KB
- README.md2.5 KB
- assets/css/style.css15 KB
- assets/fonts/inter-LICENSE.txt4.4 KB
- assets/fonts/inter-latin-wght-italic.woff251 KB
- assets/fonts/inter-latin-wght-normal.woff247 KB
- assets/images/daypack.svg652 B
- assets/images/desklamp.svg557 B
- assets/images/favicon.svg342 B
- assets/images/notebooks.svg660 B
- assets/images/pourover.svg696 B
- assets/images/sweater.svg580 B
- assets/js/main.js15 KB
- documentation/index.html11 KB
- documentation/licenses/lucide-LICENSE.txt3.1 KB
- index.html7.6 KB
Colours
These custom properties are defined at the top of the stylesheet. Change a value once and it updates everywhere it is used.
--color-slate#0f172a--color-slate-2#334155--color-muted#566275--color-blue#3b82f6--color-blue-strong#1d4ed8--color-blue-soft#eff6ff--color-rule#e2e8f0--color-panel#f8fafc--color-white#ffffff--color-danger#b91c1c--color-ok#15803d
Interactive features
Quantity steppers
Quantity limits come from each item's stock value and MAX_QTY in assets/js/main.js. Edit the DEMO_CART array to change the items.
Promo codes
Demo codes: SAVE10 (10% off), BLUE20 ($20 off orders of $100 or more) and SHIPFREE (free standard shipping). Add your own in the PROMOS object in main.js.
Shipping and tax
Change prices and the free-shipping threshold in the SHIPPING object and the rate in TAX_RATE, both at the top of main.js.
Remove with undo
Removed items are pushed onto undoStack and restored in order from the toast. The toast stays for six seconds; change the timeout in showToast().
Customisation notes
Connecting a real cart
Replace DEMO_CART and DEMO_SAVED with data from your backend and call your API from the click handlers in onItemClick().
Wiring the checkout button
The Continue to checkout button currently shows a demo message. Replace its handler at the bottom of init() with a link or navigation to your checkout page.
Product images
Thumbnails are SVG files in assets/images named by the art value of each item. Use photos of any square size instead.
What is front-end only
This is a front-end template. The behaviours below are demonstrations that run in the browser; connect them to your own server or service before relying on them.
- The basket holds demo data in memory only and resets on reload.
- The promo code form validates against codes in the script; the Continue to checkout button only shows a message and takes no payment.
Bundled components and licences
Everything the template needs is inside the download; nothing is loaded from the network.
- Inter typeface — OFL-1.1 (
assets/fonts/inter-LICENSE.txt) - Lucide icons (inlined SVG) — ISC (
documentation/licenses/lucide-LICENSE.txt)
Changelog
Version 1.0.0 · Nov 23, 2026
- Initial release.