Bootstrap 5 Hero Banner with Typewriter Headline
A full-height hero banner with a typewriter headline that cycles through key benefits, a pair of call-to-action buttons and a glass dashboard preview.
<section class="wdw-stage p-0 hero-wrap" id="top">
<div class="wdw-aurora hero w-100 d-flex flex-column">
<div class="container pt-5 mt-lg-4 flex-grow-1 d-flex flex-column" style="max-width:960px">
<div class="text-center pt-lg-3">
<span class="badge rounded-pill bg-white bg-opacity-10 border border-light border-opacity-25 px-3 py-2 mb-4 fw-semibold">New · Version 2.0 is live</span>
<h1 class="hero-title display-3 fw-bold mb-3">
Build faster with <span class="hero-type" id="heroType" data-words='["flexibility","clean code","great design","speed"]' aria-live="polite">flexibility</span><span class="hero-caret" aria-hidden="true"></span>
</h1>
<p class="lead hero-sub mx-auto mb-4" style="max-width:34rem">A modern component kit with extra-ordinary flexibility. Ship polished pages in hours, not weeks.</p>
<div class="d-flex flex-column flex-sm-row gap-3 justify-content-center mb-5">
<a href="#features" class="btn btn-light rounded-pill px-4 fw-semibold">Explore features</a>
<a href="#demo" class="btn btn-outline-light rounded-pill px-4">
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M8 5.5v13a1 1 0 0 0 1.5.86l10.5-6.5a1 1 0 0 0 0-1.72L9.5 4.64A1 1 0 0 0 8 5.5Z"/></svg>
Watch demo
</a>
</div>
</div>
<div class="hero-mock mx-auto mt-auto w-100" aria-hidden="true">
<div class="d-flex gap-2 mb-3 align-items-center"><span class="dot"></span><span class="dot"></span><span class="dot"></span><span class="ms-auto mock-pill"></span></div>
<div class="d-flex gap-3">
<div class="mock-side d-none d-sm-flex flex-column gap-2">
<span class="mock-nav active"></span><span class="mock-nav"></span><span class="mock-nav"></span><span class="mock-nav"></span>
</div>
<div class="flex-grow-1">
<div class="row g-3 mb-3">
<div class="col-4"><div class="mock-tile"><b>12.4k</b><small>Visitors</small></div></div>
<div class="col-4"><div class="mock-tile"><b>3.8%</b><small>Conversion</small></div></div>
<div class="col-4"><div class="mock-tile"><b>$24k</b><small>Revenue</small></div></div>
</div>
<div class="mock-chart d-flex align-items-end gap-2">
<i style="height:35%"></i><i style="height:55%"></i><i style="height:42%"></i><i style="height:70%"></i><i style="height:58%"></i><i style="height:84%"></i><i style="height:66%"></i><i style="height:95%"></i><i style="height:78%"></i><i style="height:100%"></i>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
/* Web Designer Wall library style — shared base for every Bootstrap 5 snippet.
Indigo accent, Plus Jakarta Sans, soft cards, pill buttons. Works in light and dark. */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");
:root,
[data-bs-theme="light"] {
--wdw-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--bs-body-font-family: var(--wdw-font);
--bs-primary: #4f46e5;
--bs-primary-rgb: 79, 70, 229;
--bs-primary-text-emphasis: #3730a3;
--bs-primary-bg-subtle: #eef2ff;
--bs-primary-border-subtle: #c7d2fe;
--bs-link-color: #4f46e5;
--bs-link-color-rgb: 79, 70, 229;
--bs-link-hover-color: #4338ca;
--bs-link-hover-color-rgb: 67, 56, 202;
--bs-focus-ring-color: rgba(79, 70, 229, 0.25);
--bs-border-radius: 0.75rem;
--bs-border-radius-lg: 1rem;
--bs-border-radius-xl: 1.25rem;
--wdw-radius-card: 1.25rem;
--wdw-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 16px 40px -16px rgba(16, 24, 40, 0.22);
--wdw-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 12px -4px rgba(16, 24, 40, 0.12);
--wdw-stage: #f5f6fb;
}
[data-bs-theme="dark"] {
--bs-primary: #818cf8;
--bs-primary-rgb: 129, 140, 248;
--bs-primary-text-emphasis: #c7d2fe;
--bs-primary-bg-subtle: rgba(129, 140, 248, 0.14);
--bs-primary-border-subtle: rgba(129, 140, 248, 0.35);
--bs-link-color: #a5b4fc;
--bs-link-color-rgb: 165, 180, 252;
--bs-link-hover-color: #c7d2fe;
--bs-link-hover-color-rgb: 199, 210, 254;
--bs-focus-ring-color: rgba(129, 140, 248, 0.35);
--wdw-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.7);
--wdw-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px -4px rgba(0, 0, 0, 0.5);
--wdw-stage: #0f1117;
}
body { font-family: var(--wdw-font); -webkit-font-smoothing: antialiased; }
/* Bootstrap compiles its blue into these components; point them at the accent. */
.btn-primary {
--bs-btn-bg: var(--bs-primary); --bs-btn-border-color: var(--bs-primary);
--bs-btn-hover-bg: #4338ca; --bs-btn-hover-border-color: #4338ca;
--bs-btn-active-bg: #3730a3; --bs-btn-active-border-color: #3730a3;
--bs-btn-disabled-bg: var(--bs-primary); --bs-btn-disabled-border-color: var(--bs-primary);
--bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
[data-bs-theme="dark"] .btn-primary { --bs-btn-color: #0f1117; --bs-btn-hover-bg: #a5b4fc; --bs-btn-hover-border-color: #a5b4fc; --bs-btn-hover-color: #0f1117; --bs-btn-active-color: #0f1117; }
.btn-outline-primary {
--bs-btn-color: var(--bs-primary); --bs-btn-border-color: var(--bs-primary);
--bs-btn-hover-bg: var(--bs-primary); --bs-btn-hover-border-color: var(--bs-primary);
--bs-btn-active-bg: var(--bs-primary); --bs-btn-active-border-color: var(--bs-primary);
--bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
.btn { --bs-btn-font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn-sm { min-height: 36px; }
.form-control, .form-select { min-height: 44px; border-radius: .75rem; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: rgba(var(--bs-primary-rgb), .6); box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.form-check-input:checked { background-color: var(--bs-primary); border-color: var(--bs-primary); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--bs-primary); }
.nav { --bs-nav-link-color: var(--bs-secondary-color); --bs-nav-link-hover-color: var(--bs-emphasis-color); }
.pagination { --bs-pagination-active-bg: var(--bs-primary); --bs-pagination-active-border-color: var(--bs-primary); --bs-pagination-color: var(--bs-body-color); --bs-pagination-focus-box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.progress, .progress-stacked { --bs-progress-bar-bg: var(--bs-primary); }
.list-group { --bs-list-group-active-bg: var(--bs-primary); --bs-list-group-active-border-color: var(--bs-primary); }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--bs-primary); border-radius: .875rem; box-shadow: var(--wdw-shadow-sm); }
.accordion { --bs-accordion-active-bg: var(--bs-primary-bg-subtle); --bs-accordion-active-color: var(--bs-primary-text-emphasis); --bs-accordion-btn-focus-box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.badge { font-weight: 600; }
/* Library building blocks — use these instead of re-inventing them per snippet. */
.wdw-stage { min-height: 100vh; display: flex; align-items: center; background: var(--wdw-stage); padding-block: 3rem; }
.wdw-card { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: var(--wdw-radius-card); box-shadow: var(--wdw-shadow); }
.wdw-card-sm { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: 1rem; box-shadow: var(--wdw-shadow-sm); }
.wdw-aurora { position: relative; color: #fff; background: radial-gradient(60% 55% at 100% 0, #818cf8 0, transparent 70%), radial-gradient(65% 60% at 0 100%, #ec4899 0, transparent 65%), #1e1b4b; }
.wdw-eyebrow { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bs-primary); }
.wdw-heading { font-weight: 800; letter-spacing: -.02em; color: var(--bs-emphasis-color); }
.wdw-muted { color: var(--bs-secondary-color); }
.wdw-icon { width: 2.75rem; height: 2.75rem; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: .875rem; background: var(--bs-primary-bg-subtle); color: var(--bs-primary); }
/* Component */
.hero-wrap { min-height: 0; align-items: stretch; }
.hero { min-height: 100vh; overflow: hidden; }
.hero-title { letter-spacing: -.03em; line-height: 1.1; min-height: 1.2em; }
.hero-type { color: #c7d2fe; }
.hero-caret { display: inline-block; width: 3px; height: .9em; margin-left: 4px; vertical-align: -.08em; background: #c7d2fe; animation: heroBlink 1s steps(1) infinite; }
.hero-sub { color: rgba(255,255,255,.8); }
.hero-mock { max-width: 680px; padding: 1.1rem 1.25rem 0; border-radius: 1.25rem 1.25rem 0 0; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); border-bottom: 0; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); backdrop-filter: blur(8px); }
.hero-mock .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.4); }
.mock-pill { width: 90px; height: 10px; border-radius: 99px; background: rgba(255,255,255,.22); }
.mock-side { width: 44px; padding-top: .25rem; }
.mock-nav { display: block; height: 32px; border-radius: .6rem; background: rgba(255,255,255,.12); }
.mock-nav.active { background: rgba(199,210,254,.55); }
.mock-tile { padding: .9rem 1rem; border-radius: .875rem; background: rgba(255,255,255,.12); display: flex; flex-direction: column; text-align: left; }
.mock-tile b { font-size: 1.35rem; font-weight: 800; }
.mock-tile small { color: rgba(255,255,255,.7); }
.mock-chart { height: 130px; padding: 1rem 1rem 0; border-radius: .875rem .875rem 0 0; background: rgba(255,255,255,.08); }
.mock-chart i { flex: 1; border-radius: 6px 6px 0 0; background: linear-gradient(rgba(199,210,254,.9), rgba(199,210,254,.35)); }
@keyframes heroBlink { 50% { opacity: 0; } }
@media (max-width: 575.98px) { .hero-title { font-size: 2.25rem; min-height: 2.4em; } .mock-tile b { font-size: 1.05rem; } .mock-chart { height: 90px; } }
@media (prefers-reduced-motion: reduce) { .hero-caret { animation: none; } }
function initTypewriter() {
const el = document.getElementById('heroType');
if (!el) return;
const words = JSON.parse(el.dataset.words || '[]');
if (!words.length || window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
let w = 0, n = 0, del = false;
el.setAttribute('aria-live', 'off');
const tick = () => {
const word = words[w];
n += del ? -1 : 1;
el.textContent = word.slice(0, n);
let delay = del ? 45 : 95;
if (!del && n === word.length) { del = true; delay = 1800; }
else if (del && n === 0) { del = false; w = (w + 1) % words.length; delay = 350; }
setTimeout(tick, delay);
};
setTimeout(tick, 1800);
}
initTypewriter();
Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.