A bold, conversion-focused homepage for a plumbing and home services company, built with Bootstrap 6 for a fictional business called Rapidflow. It keeps the emergency number in sight, collects call-back requests in the hero and answers: do you cover my area, and what will it cost?
How it works
The page lives in .rf-page (data-bs-theme="light") with dark scopes on the navbar, hero and footer. The Bootstrap 6 primary role is remapped to safety orange with navy text through --bs-primary-bg and --bs-primary-contrast.
- Top bar and navbar:
.rf-topbarshows a pulsing 24/7 status and the phone number. Thenavbar lg:navbar-expandcollapses into<dialog class="drawer drawer-end">below 1024px. "Services" opens a grouped.menu; "Emergency?" opens the#rf-emergencyDialog. - Hero: a photo with a navy gradient, a large call button and three stats. The
.rf-quotecard holds abtn-checkurgency group, a searchable Combobox (data-bs-search="true") and ZIP and phone fields in a<form data-bs-validate novalidate>. - Services:
.rf-cardtiles plus a full-width.rf-card-widerow. - Service areas: an inline SVG map whose
.rf-zoneshapes light up. The ZIP checker looks codes up inRF_ZONESand writes analert theme-success,theme-infoortheme-warninginto a live region. Neighborhood.chipbuttons fill in the ZIP. - Pricing: a
table-cardwithsm:table-stacked, so rows turn into labelled cards on narrow screens usingdata-cell. "Book" links preselect the Combobox option viadata-rf-issue. - Reviews and FAQ: a carousel and an exclusive
<details name="rf-faq">accordion. - Submit: the script checks the Combobox's hidden
issueinput, shows a spinner, then a Toast. When "Now" is chosen it also opens the emergency Dialog with shut-off steps.
Customization
- Change
--rf-orangeand--rf-navyon.rf-pageinstyle.css; update the--bs-primary-*overrides beside them so buttons follow. - Edit
RF_ZONESinscript.jsto list your ZIP codes, zone names and arrival times, and rename thedata-rf-zoneshapes in the SVG map to match. - Edit
RF_URGENCYto change the confirmation text for each urgency option. - Add or remove rows in
.rf-table, keeping adata-celllabel on every cell. - Replace the
setTimeoutin the quote form submit handler withfetch()to your CRM or dispatch endpoint. - The photos come from Unsplash; replace them with pictures of your own team and vans.
Accessibility
A skip link jumps to #rf-main. The map is a single role="img" with a text label, ZIP results are announced through role="status", the urgency group has an accessible label, and invalid fields get visible messages and focus. Carousel buttons have hidden text labels, the Dialog has aria-labelledby, and animations stop under prefers-reduced-motion.
Bootstrap 6 notes
Built on Bootstrap 6.0.0-alpha.1 (alpha APIs can still change). Coming from Bootstrap 5: btn-solid theme-primary replaces btn-primary, the mobile menu is a Drawer instead of navbar-collapse, Dropdown is now Menu, Modal is now Dialog, alerts use alert theme-*, and responsive tables use sm:table-stacked. New components used: Combobox, Chips and Dialog. The script imports Drawer, Dialog and Toast as an ES module.