Skip to content

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.

Live preview

Open in new tab

Code

A dark, high-contrast gym homepage built with Bootstrap 6 for a fictional strength club called Forge. It includes a class timetable, membership plans, coach profiles and a free day pass form.

How it works

Everything sits inside .ag-page, which has data-bs-theme="dark" and re-maps the Bootstrap 6 primary role (--bs-primary-bg, --bs-primary-contrast and the rest) to a volt green. Every btn-solid theme-primary, badge, chip and range then uses the brand color.

  • Navbar: navbar lg:navbar-expand with a <dialog class="drawer drawer-end"> that becomes the inline link row from 1024px. "Training" opens a .menu with icons and descriptions. The script closes the drawer when an in-page link is chosen.
  • Hero: a full-bleed Unsplash photo under a gradient, an outlined headline (.ag-outline), two calls to action and a <dl class="ag-stats"> stat strip.
  • Programs and coaches: photo cards (.ag-program, .ag-coach) that switch from grayscale to color on hover. Coach specialties use Bootstrap 6 .chips.
  • Timetable: nav nav-tabs day tabs (data-bs-toggle="tab"). The script builds each .tab-pane from the AG_WEEK object, opens today's tab with Tab.getOrCreateInstance() and marks it with .ag-today.
  • Membership: a btn-group of btn-check radios swaps data-ag-monthly / data-ag-yearly prices. A Bootstrap 6 .form-range slider ("How often will you train?") adds .is-recommended to the plan that fits.
  • Free pass form: <form data-bs-validate novalidate> with a Bootstrap 6 Datepicker (its minimum date is set to today in script) and a Combobox for the main goal. On submit the script flags invalid fields with .is-invalid, fakes the request and opens #ag-toast.
  • FAQ and footer: an exclusive <details name="ag-faq"> accordion, hours and address.

Customization

  • Change --ag-volt and the --bs-primary-* overrides in .ag-page (style.css) to use your brand color.
  • Edit the AG_WEEK object at the top of script.js to set your classes, coaches and capacities per weekday.
  • Set prices in data-ag-monthly / data-ag-yearly on each .ag-price.
  • Change the thresholds in recommend() to control which data-ag-plan card the range recommends.
  • Replace the setTimeout in the form's submit handler with fetch() to your booking endpoint.
  • Swap --ag-display for another condensed font, or remove .ag-ticker for a calmer page.
  • All photos come from Unsplash. Replace them with photos of your own gym and coaches.

Accessibility

The page has a skip link, labelled navigation and role="tab" / aria-selected tabs. Visually hidden text gives each "Book" button the class name and time. Price and recommendation changes are announced in an aria-live region, and the toast uses role="status". Focus outlines are visible in volt green. Under prefers-reduced-motion the ticker and hover transitions stop.

Bootstrap 6 notes

Built on Bootstrap 6.0.0-alpha.1, so alpha APIs may still change. Here is how Bootstrap 5 patterns map:

  • btn-solid theme-primary replaces the per-color button classes.
  • Drawer replaces navbar-collapse and Offcanvas.
  • Menu replaces Dropdown.
  • <details> replaces the old accordion collapse.
  • .form-range wraps the range input.
  • Datepicker and Combobox are new built-in components.

The script imports Drawer, Tab and Toast from the bundle as an ES module.

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=Anton&family=Barlow:wght@400;500;600;700;800&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.

Fitness Gym Homepage Template – Bootstrap 6 home pages component screenshot
Fitness Gym Homepage Template · Bootstrap 6 Home Pages

More Home Pages

Kindergarten Homepage Template – Bootstrap 6 home pages preview

Kindergarten Homepage Template

Playful Bootstrap 6 kindergarten homepage with a drawer navbar, photo collage hero, program tabs, daily rhythm stepper, teacher cards, parent reviews and a visit booking form.

University Homepage Template – Bootstrap 6 home pages preview

University Homepage Template

Classic Bootstrap 6 university homepage with a campus photo hero, visit datepicker, program finder tabs, news, upcoming events, student testimonials carousel and admissions form.

Online Course Homepage Template – Bootstrap 6 home pages preview

Online Course Homepage Template

Bootstrap 6 online course platform homepage with a topic combobox search, filterable course catalog, preview dialog, instructors, learner reviews, pricing switch and signup form.

Accounting Firm Homepage Template – Bootstrap 6 home pages preview

Accounting Firm Homepage Template

Bootstrap 6 accounting firm homepage template with a savings estimator, services grid, onboarding steps, client testimonials, FAQ and a consultation booking form with datepicker.

Law Firm Homepage Template – Bootstrap 6 home pages preview

Law Firm Homepage Template

Bootstrap 6 law firm homepage template with a drawer navbar, practice area tabs, case results, attorney profiles, client reviews, FAQ and a free consultation form.

Dental Clinic Homepage Template – Bootstrap 6 home pages preview

Dental Clinic Homepage Template

Warm Bootstrap 6 dental clinic homepage with pill navbar, arched photo hero, treatment tabs, before/after Range slider, team, membership plans, reviews carousel and inline-calendar booking.