Skip to content

Electronics Store Homepage Template

Dark Bootstrap 6 electronics shop homepage with a bento deals hero, live flash-sale countdown, filterable product grid, cart drawer, trade-in estimator, reviews and newsletter.

Also known as: gadget store homepage, tech shop landing page, consumer electronics website design, online electronics retailer homepage

Electronics Store Homepage Template live demo

Open in new tab

Bootstrap 6 code (HTML, CSS, JS)

A dark electronics store homepage built with Bootstrap 6 for a fictional retailer called Kilowatt. It has a bento deals hero, a filterable product grid with a cart drawer, a trade-in estimator, reviews and a newsletter signup.

How it works

Everything sits inside .kw-page, which carries data-bs-theme="dark" and maps the Bootstrap 6 primary role (--bs-primary-bg and related tokens) to an electric blue.

  • Promo bar and navbar: the yellow .kw-promo bar shows a flash-sale timer. It counts down to the next local midnight, so it never goes stale. The navbar lg:navbar-expand collapses into a <dialog class="drawer">. "Shop" opens a .menu, and search uses form-adorn with a form-ghost input.
  • Hero: .kw-bento is a CSS grid with three tiles. .kw-tile-main holds the headline product, .kw-tile-deal a deal of the day with a progress bar, and .kw-tile-watch a small promo. The .kw-cats links below jump to the grid and apply a filter.
  • Products: each .kw-card has a data-kw-cat value. Bootstrap 6 .chip buttons with data-kw-filter hide cards that don't match and announce the result count.
  • Cart: any button with data-kw-add, data-kw-name and data-kw-price adds a line to an in-memory cart. The #kw-cart Drawer lists the lines and subtotal, and Toast.getOrCreateInstance() confirms each addition.
  • Trade-in: a select.form-control, a btn-check radio group and the Bootstrap 6 Range component (.form-range wrapping .form-range-input) feed a live estimate in an <output>.
  • Reviews and signup: a rating summary with progress bars and three quote cards. The newsletter form uses data-bs-validate and a .switch, and a simulated submit shows the toast.

Customization

  • To rebrand, change --kw-blue and --kw-yellow on .kw-page in style.css. The --bs-primary-* overrides read from --kw-blue.
  • To change the trade-in values, edit the value of each <option> in [data-kw-device] (base credit in dollars) or the radio values in name="kw-cond" (condition multiplier).
  • To add a product, copy a .kw-card and set data-kw-cat to audio, computing, mobile or play, plus data-kw-name and data-kw-price on its add button.
  • To use your own cart, replace the cart Map in script.js with calls to your cart API.
  • To send signups somewhere, replace the setTimeout in the newsletter submit handler with fetch() to your endpoint.
  • The product photos come from Unsplash; replace them with your own. The footer credit links to WebDevSnippets; you can keep it or remove it.

Use cases

  • Electronics retailers: a bento deals hero highlights headline products and a deal of the day
  • Flash sale promotions: a countdown timer in the promo bar keeps shoppers moving toward checkout
  • Gadget shops with categories: chips filter the product grid by audio, computing, mobile or play
  • Trade-in programs: the estimator with device, condition and slider shows an instant credit estimate

Accessibility

A skip link jumps to #kw-main. Icon-only add buttons have an aria-label that names the product, and filter chips expose aria-pressed. The filter count, trade-in estimate and toast are announced through live regions. The script syncs aria-expanded on the navbar toggler, and focus outlines use the yellow accent. Motion is off under prefers-reduced-motion.

Bootstrap 6 notes

This page is built on Bootstrap 6.0.0-alpha.1, so alpha APIs can still change. btn-solid theme-primary replaces btn btn-primary. The navbar collapses into a Drawer instead of navbar-collapse, and the cart is a Drawer where Bootstrap 5 used Offcanvas. Menu replaces Dropdown, .chip and .form-range are new components, and form-control now styles the <select>. The script imports Drawer and Toast from the bundle as an ES module.

Electronics Store Homepage Template at a glance

Framework
Bootstrap 6
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Bootstrap 6, Bootstrap Icons, fonts.googleapis.com
Layout
Responsive, works on mobile, dark design
Category
Home Pages
License
Free for personal and commercial use

Questions about this template

Can I use the Electronics Store Homepage Template code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Bootstrap 6 and Bootstrap Icons and fonts.googleapis.com from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@6.0.0-alpha.1/dist/css/bootstrap.min.css">
  • <script type="module" src="https://cdn.jsdelivr.net/npm/bootstrap@6.0.0-alpha.1/dist/js/bootstrap.bundle.min.js"></script>
  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
  • <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Archivo:wght@400;500;600;700&display=swap">

Built for Bootstrap 6.0.0-alpha.1. Bootstrap 6 ships as an ES module, so its script and this component's JavaScript load with type="module". Alpha releases can still change before the stable version.

Electronics Store Homepage Template – Bootstrap 6 home pages component screenshot
Electronics Store Homepage Template · Bootstrap 6 Home Pages

More Home Pages

Restaurant Homepage Template – Bootstrap 6 home pages preview

Restaurant Homepage Template

Dark Bootstrap 6 restaurant homepage with a photo hero, live opening status, tabbed menu highlights, chef story, reviews, a datepicker reservation form and footer.

Music Band Homepage Template – Bootstrap 6 home pages preview

Music Band Homepage Template

Dark Bootstrap 6 music band homepage with a photo hero, relative tour dates with a region filter, album tracklists, video dialog, press quotes and a mailing list form.

Event Conference Homepage Template – Bootstrap 6 home pages preview

Event Conference Homepage Template

Dark Bootstrap 6 tech conference homepage template with a live countdown hero, speaker dialogs, two-day schedule tabs with track filters, ticket tiers with a team Range slider and FAQ.

Fitness Gym Homepage Template – Bootstrap 6 home pages preview

Fitness Gym Homepage Template

Dark Bootstrap 6 gym homepage with drawer navbar, photo hero, programs, a weekly class timetable, membership plans with a range-based recommender, coaches and a free-pass form.

Barbershop Homepage Template – Bootstrap 6 home pages preview

Barbershop Homepage Template

Dark Bootstrap 6 barbershop homepage with a drawer navbar, price-list tabs, barber cards, a booking form with Combobox and Datepicker, reviews, live opening hours and a footer.

Interior Design Homepage Template – Bootstrap 6 home pages preview

Interior Design Homepage Template

Warm Bootstrap 6 interior design homepage with arched photo hero, services, tabbed portfolio, before/after range slider, process accordion, reviews and a consultation form with datepicker.