Web Pages Easy
Hero CTA Section
A full-width hero section with gradient headline, eyebrow badge, two CTA buttons, and radial glow background. Pure CSS — no JS required.
Open in Lab
MCP
css html vue svelte
Targets: TS HTML React Vue Svelte
Code
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root {
--bg: #030712;
--accent-1: #818cf8;
--accent-2: #38bdf8;
--text: #f1f5f9;
--muted: #94a3b8;
}
html,
body {
width: 100%;
height: 100%;
background: var(--bg);
color: var(--text);
font-family: system-ui, -apple-system, sans-serif;
-webkit-font-smoothing: antialiased;
}
/* ── Layout ── */
.hero {
min-height: 100vh;
display: grid;
place-items: center;
padding: 2rem;
position: relative;
overflow: hidden;
}
/* ── Background glow ── */
.hero-glow {
position: absolute;
top: -15%;
left: 50%;
transform: translateX(-50%);
width: 900px;
height: 700px;
background: radial-gradient(
ellipse at center,
rgba(99, 102, 241, 0.18) 0%,
rgba(56, 189, 248, 0.1) 40%,
transparent 70%
);
pointer-events: none;
}
/* ── Content ── */
.hero-content {
position: relative;
text-align: center;
max-width: 700px;
}
.hero-eyebrow {
display: inline-flex;
align-items: center;
font-size: 0.8125rem;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--accent-1);
padding: 0.375rem 1rem;
border: 1px solid rgba(129, 140, 248, 0.3);
border-radius: 999px;
background: rgba(129, 140, 248, 0.08);
margin-bottom: 1.5rem;
}
.hero-title {
font-size: clamp(2.5rem, 7vw, 5rem);
font-weight: 900;
line-height: 1.05;
letter-spacing: -0.03em;
background: linear-gradient(135deg, #f1f5f9 25%, var(--accent-1) 60%, var(--accent-2));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 1.5rem;
}
.hero-subtitle {
font-size: 1.125rem;
line-height: 1.7;
color: var(--muted);
margin-bottom: 2.5rem;
}
/* ── Buttons ── */
.hero-actions {
display: flex;
align-items: center;
justify-content: center;
gap: 0.875rem;
flex-wrap: wrap;
}
.btn {
display: inline-flex;
align-items: center;
padding: 0.75rem 1.875rem;
border-radius: 0.75rem;
font-size: 0.9375rem;
font-weight: 600;
text-decoration: none;
transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
cursor: pointer;
border: none;
}
.btn-primary {
background: linear-gradient(135deg, #6366f1, #38bdf8);
color: #fff;
box-shadow: 0 0 28px rgba(99, 102, 241, 0.45);
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
}
.btn-ghost {
background: rgba(255, 255, 255, 0.06);
color: var(--muted);
border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn-ghost:hover {
background: rgba(255, 255, 255, 0.1);
color: var(--text);
}<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hero CTA</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<section class="hero">
<div class="hero-glow" aria-hidden="true"></div>
<div class="hero-content">
<p class="hero-eyebrow">Open Source</p>
<h1 class="hero-title">Build faster.<br />Ship better.</h1>
<p class="hero-subtitle">
A collection of ready-to-use components, animations, and patterns.
Free to copy, forever.
</p>
<div class="hero-actions">
<a href="#" class="btn btn-primary">Get Started →</a>
<a href="#" class="btn btn-ghost">View on GitHub</a>
</div>
</div>
</section>
</body>
</html>export default function HeroCTASection() {
return (
<section className="relative min-h-screen grid place-items-center overflow-hidden bg-[#030712] px-8">
{/* Glow */}
<div
aria-hidden
className="pointer-events-none absolute -top-[15%] left-1/2 -translate-x-1/2 w-[900px] h-[700px]"
style={{
background:
"radial-gradient(ellipse at center, rgba(99,102,241,.18) 0%, rgba(56,189,248,.10) 40%, transparent 70%)",
}}
/>
{/* Content */}
<div className="relative text-center max-w-[700px]">
<p className="inline-flex items-center text-[0.8125rem] font-semibold tracking-widest uppercase text-indigo-400 px-4 py-1.5 rounded-full border border-indigo-400/30 bg-indigo-400/8 mb-6">
Open Source
</p>
<h1
className="text-[clamp(2.5rem,7vw,5rem)] font-black leading-[1.05] tracking-tighter mb-6"
style={{
background: "linear-gradient(135deg,#f1f5f9 25%,#818cf8 60%,#38bdf8)",
WebkitBackgroundClip: "text",
WebkitTextFillColor: "transparent",
backgroundClip: "text",
}}
>
Build faster.
<br />
Ship better.
</h1>
<p className="text-lg text-slate-400 leading-relaxed mb-10">
A collection of ready-to-use components, animations, and patterns. Free to copy, forever.
</p>
<div className="flex items-center justify-center gap-3.5 flex-wrap">
<a
href="#"
className="inline-flex items-center px-7 py-3 rounded-xl text-[0.9375rem] font-semibold text-white transition-all hover:-translate-y-0.5"
style={{
background: "linear-gradient(135deg,#6366f1,#38bdf8)",
boxShadow: "0 0 28px rgba(99,102,241,.45)",
}}
>
Get Started →
</a>
<a
href="#"
className="inline-flex items-center px-7 py-3 rounded-xl text-[0.9375rem] font-semibold text-slate-400 border border-white/12 bg-white/6 hover:bg-white/10 hover:text-slate-100 transition-all"
>
View on GitHub
</a>
</div>
</div>
</section>
);
}<template>
<section style="position:relative;min-height:100vh;display:grid;place-items:center;overflow:hidden;background:#030712;padding:0 2rem;font-family:system-ui,-apple-system,sans-serif">
<!-- Glow -->
<div aria-hidden="true" style="pointer-events:none;position:absolute;top:-15%;left:50%;transform:translateX(-50%);width:900px;height:700px;background:radial-gradient(ellipse at center, rgba(99,102,241,0.18) 0%, rgba(56,189,248,0.10) 40%, transparent 70%)"></div>
<!-- Content -->
<div style="position:relative;text-align:center;max-width:700px">
<p style="display:inline-flex;align-items:center;font-size:0.8125rem;font-weight:600;letter-spacing:0.1em;text-transform:uppercase;color:#818cf8;padding:0.375rem 1rem;border-radius:999px;border:1px solid rgba(129,140,248,0.3);background:rgba(129,140,248,0.08);margin-bottom:1.5rem">
Open Source
</p>
<h1 style="font-size:clamp(2.5rem,7vw,5rem);font-weight:900;line-height:1.05;letter-spacing:-0.03em;margin:0 0 1.5rem;background:linear-gradient(135deg,#f1f5f9 25%,#818cf8 60%,#38bdf8);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text">
Build faster.<br/>Ship better.
</h1>
<p style="font-size:1.125rem;color:#94a3b8;line-height:1.7;margin:0 0 2.5rem">
A collection of ready-to-use components, animations, and patterns.
Free to copy, forever.
</p>
<div style="display:flex;align-items:center;justify-content:center;gap:0.875rem;flex-wrap:wrap">
<a href="#" style="display:inline-flex;align-items:center;padding:0.75rem 1.75rem;border-radius:0.75rem;font-size:0.9375rem;font-weight:600;color:white;text-decoration:none;background:linear-gradient(135deg,#6366f1,#38bdf8);box-shadow:0 0 28px rgba(99,102,241,0.45)">
Get Started →
</a>
<a href="#" style="display:inline-flex;align-items:center;padding:0.75rem 1.75rem;border-radius:0.75rem;font-size:0.9375rem;font-weight:600;color:#94a3b8;text-decoration:none;border:1px solid rgba(255,255,255,0.12);background:rgba(255,255,255,0.06)">
View on GitHub
</a>
</div>
</div>
</section>
</template><section style="position:relative;min-height:100vh;display:grid;place-items:center;overflow:hidden;background:#030712;padding:0 2rem;font-family:system-ui,-apple-system,sans-serif">
<!-- Glow -->
<div aria-hidden="true" style="pointer-events:none;position:absolute;top:-15%;left:50%;transform:translateX(-50%);width:900px;height:700px;background:radial-gradient(ellipse at center, rgba(99,102,241,0.18) 0%, rgba(56,189,248,0.10) 40%, transparent 70%)"></div>
<!-- Content -->
<div style="position:relative;text-align:center;max-width:700px">
<p style="display:inline-flex;align-items:center;font-size:0.8125rem;font-weight:600;letter-spacing:0.1em;text-transform:uppercase;color:#818cf8;padding:0.375rem 1rem;border-radius:999px;border:1px solid rgba(129,140,248,0.3);background:rgba(129,140,248,0.08);margin-bottom:1.5rem">
Open Source
</p>
<h1 style="font-size:clamp(2.5rem,7vw,5rem);font-weight:900;line-height:1.05;letter-spacing:-0.03em;margin:0 0 1.5rem;background:linear-gradient(135deg,#f1f5f9 25%,#818cf8 60%,#38bdf8);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text">
Build faster.<br/>Ship better.
</h1>
<p style="font-size:1.125rem;color:#94a3b8;line-height:1.7;margin:0 0 2.5rem">
A collection of ready-to-use components, animations, and patterns.
Free to copy, forever.
</p>
<div style="display:flex;align-items:center;justify-content:center;gap:0.875rem;flex-wrap:wrap">
<a href="#" style="display:inline-flex;align-items:center;padding:0.75rem 1.75rem;border-radius:0.75rem;font-size:0.9375rem;font-weight:600;color:white;text-decoration:none;background:linear-gradient(135deg,#6366f1,#38bdf8);box-shadow:0 0 28px rgba(99,102,241,0.45)">
Get Started →
</a>
<a href="#" style="display:inline-flex;align-items:center;padding:0.75rem 1.75rem;border-radius:0.75rem;font-size:0.9375rem;font-weight:600;color:#94a3b8;text-decoration:none;border:1px solid rgba(255,255,255,0.12);background:rgba(255,255,255,0.06)">
View on GitHub
</a>
</div>
</div>
</section>A full-viewport hero section that works as the first block of any landing page. Centered layout, gradient text headline, subtitle, and two call-to-action buttons.
What’s included
- Responsive full-viewport height layout
- Gradient text headline with
background-clip: text - Eyebrow badge (pill label above the headline)
- Two buttons: gradient primary + ghost border
- Soft radial glow background — no images needed
- Zero JavaScript