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.

Also known as: gym website, fitness club landing page, gym membership homepage, personal training website

Fitness Gym Homepage Template live demo

Open in new tab

Bootstrap 6 code (HTML, CSS, JS)

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.

Use cases

  • Strength clubs and gyms: a dark photo hero introduces programs and coaches
  • Class schedules: a weekly timetable shows when each class runs
  • Membership sales: plans with a range-based recommender point visitors to the right option
  • Free trials: a free day pass form collects leads for new members

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.

Fitness Gym 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 Fitness Gym 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=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

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.

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.

Podcast Homepage Template – Bootstrap 6 home pages preview

Podcast Homepage Template

Warm, light Bootstrap 6 podcast homepage with a cover-art hero and episode player, searchable episode list with topic chips, hosts, listener reviews, subscribe links and FAQ.