The Bootstrap 5 hero section replaces the deprecated jumbotron from Bootstrap 4. This page covers 5 hero section patterns — from a simple centered layout to gradient, split screen and image background heroes — each ready to copy and use.
Quick Setup
Hero sections need only Bootstrap 5 CSS:
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"/>
Key Classes Reference
| Class | What It Does |
|---|---|
.py-5 | Vertical padding (replaces jumbotron padding) |
.display-5 | Large hero heading size |
.lead | Larger intro paragraph text |
.min-vh-100 | Full viewport height section |
.d-flex align-items-center | Vertically center content |
.text-center | Center all text |
.position-relative | Required for overlay technique |
.position-absolute | Used for background overlay div |
.object-fit-cover | Makes images/video fill container |
1. Basic Bootstrap 5 Hero Section
A clean centered hero section with heading, subtext and CTA buttons. Replaces the deprecated Bootstrap 4 jumbotron.
2. Bootstrap 5 Gradient Hero Section
A dark gradient hero with colored heading and CTA. Great for SaaS and developer tool landing pages.
3. Bootstrap 5 Split Hero Section
A two-column hero with text on the left and image or illustration on the right.
4. Bootstrap 5 Hero with Background Image
A full-width hero section with a background image, dark overlay and centered content.
5. Bootstrap 5 Minimal Hero Section
A clean minimal hero with large typography, no background color. Ideal for portfolios and agencies.
Frequently Asked Questions
Need a Full Bootstrap 5 Admin Dashboard?
Get a complete Angular 21 + Bootstrap 5 dashboard with 50+ components — built by the same team behind BootstrapPlanet.
Browse Templates →Use code FIRST30 for 30% off your first purchase.