Skip to content

Split Hero with Stats

Bootstrap 6 split hero with a highlighted headline, CTAs and avatar social proof beside a bento grid of key stats with a 12-month / all-time toggle.

Also known as: hero with stats, split hero section, hero with bento grid, hero social proof numbers

Split Hero with Stats live demo

Open in new tab

Bootstrap 6 code (HTML, CSS, JS)

A two-column hero for Bootstrap 6. The left side holds a headline with a highlighter-style underline, a short pitch, two buttons and avatar social proof. The right side shows a bento grid of key results that visitors can switch between "Last 12 months" and "All time". It suits SaaS, fintech or service landing pages that want numbers above the fold.

How it works

The layout uses the Bootstrap 6 grid with the new responsive prefix: two lg:col-6 columns inside a row g-12. They stack on screens under 1024 px. The root .shs-hero sets a cream background with a lime glow. The highlighted words in the h1 get a lime band from a linear-gradient background.

The social proof row uses the new CSS-only avatar-stack with avatar avatar-sm initials. The stats panel .shs-panel holds a description list (dl.shs-stats) laid out as a two-column CSS grid. .shs-stat-feature spans the full width and adds an inline SVG sparkline. The second tile has a Bootstrap progress bar. The rating tile shows Bootstrap Icons stars, and .shs-stat-dark spans the last row with a badge badge-subtle theme-success delta.

The range switch is a Bootstrap 6 radio button group: btn-check btn-outline theme-primary labels with the input inside. script.js listens for change on the radios. It swaps every element that has data-year and data-all attributes, replays a short fade (.is-changing), updates the progress bar through --shs-p and its aria-valuenow, and announces the new range in .shs-live. Without JavaScript the 12-month numbers stay visible.

Customization

  • --shs-green, --shs-lime and --shs-ink on .shs-hero: change the brand, highlight and text colors. The --bs-primary-* overrides use these values to recolor the Bootstrap buttons.
  • --shs-cream and --shs-card: set the page and panel backgrounds.
  • data-year and data-all on each .shs-num and .shs-delta-text: edit the numbers and captions for both ranges.
  • Add another radio with a new value (e.g. quarter) and matching data-quarter attributes to support a third range.
  • Remove .shs-stat-feature or .shs-stat-dark from a tile to turn it into a regular half-width card.
  • Edit the d attribute of .shs-spark-line and .shs-spark-area to draw your own trend.
  • max-width on .shs-hero .container: makes the hero wider or narrower on large screens.

Use cases

  • SaaS landing pages: headline and buttons on the left, key results in a bento grid on the right
  • Fintech sites: visitors switch the numbers between Last 12 months and All time
  • Service businesses: avatar social proof sits right below the call to action
  • Agency pages: show numbers above the fold to build trust quickly

Accessibility

Stats are a real dl with dt labels and dd values, labelled by the panel heading. The range buttons are native radios, so arrow keys and screen readers work out of the box. The progress bar has role="progressbar", a label and an updated aria-valuenow. A polite live region reports the range change. Decorative avatars and the sparkline are hidden from assistive technology. The fade and bar transition are turned off under prefers-reduced-motion.

Bootstrap 6 notes

Bootstrap 5's col-lg-6 becomes lg:col-6, and g-5 becomes g-12 because the spacing scale changed. Toggle buttons put the input inside a label.btn-check. btn-primary is now btn-solid theme-primary, and btn-link styling uses btn-text theme-primary. The avatar and avatar-stack components are new in Bootstrap 6. Built on 6.0.0-alpha.1, so details may still change. Icons come from Bootstrap Icons.

Split Hero with Stats at a glance

Framework
Bootstrap 6
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Bootstrap 6, Bootstrap Icons
Layout
Responsive, works on mobile
Category
Hero Sections
License
Free for personal and commercial use

Questions about this template

Can I use the Split Hero with Stats 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 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">

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.

Split Hero with Stats – Bootstrap 6 hero sections component screenshot
Split Hero with Stats · Bootstrap 6 Hero Sections

More Hero Sections

Split Hero with Diagonal Photo Clip – Pure CSS hero sections preview

Split Hero with Diagonal Photo Clip

Pure CSS split hero with headline, buttons and stats beside a full-height photo cut on a diagonal with clip-path, plus an accent stripe and rating badge.

Hero with Rotating Words – Pure CSS hero sections preview

Hero with Rotating Words

Dark hero section whose headline cycles through words with a slide-and-fade animation, a pause button and decorative stat cards.

Split Hero with App Screenshot – Tailwind CSS hero sections preview

Split Hero with App Screenshot

Dark Tailwind CSS split hero with gradient headline, two CTA buttons and an animated mock app dashboard built entirely from divs.

Dark Gradient Hero – Bootstrap 6 hero sections preview

Dark Gradient Hero

Dark Bootstrap 6 hero with a blurred gradient mesh, gradient headline, glowing CTA, copyable install command, decorative orb with stats and a row of trust logos.

Hero with Search Bar – Bootstrap 6 hero sections preview

Hero with Search Bar

Bootstrap 6 directory hero on a photo background with a large pill search bar, a searchable area Combobox, popular search chips and category tiles.

SaaS Hero with App Screenshot – Bootstrap 6 hero sections preview

SaaS Hero with App Screenshot

Bootstrap 6 SaaS hero with a New badge, gradient headline, two CTAs and an app screenshot in a browser frame with switchable tabs and a tour Dialog.