Centered Hero

Center-stage headline for a focused, single-message opening.

ThemeMode
Theme tokens add once per site, shared by every block
:root {
  color-scheme: light dark;
  --color-primary: light-dark(#18181b, #fafafa);
  --color-accent: light-dark(#4f46e5, #818cf8);
  --color-bg: light-dark(#ffffff, #0b0b0d);
  --color-surface: light-dark(#f7f7f8, #161619);
  --color-text: light-dark(#0a0a0c, #f5f5f6);
  --color-text-muted: light-dark(#52525b, #a1a1aa);
  --color-border: light-dark(#e4e4e7, #26262b);
  --font-heading: 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.375rem;
  --text-4xl: 3.5rem;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-bold: 700;
  --leading-tight: 1.1;
  --leading-normal: 1.6;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;
  --radius: 0.625rem;
  --shadow: 0 1px 2px rgb(10 10 12 / 0.05), 0 4px 12px rgb(10 10 12 / 0.06), 0 16px 40px rgb(10 10 12 / 0.06);
  --container-width: 1120px;
}
Theme tokens add once per site, shared by every block
:root {
  color-scheme: light dark;
  --color-primary: light-dark(#4f46e5, #818cf8);
  --color-accent: light-dark(#a855f7, #c084fc);
  --color-bg: light-dark(#ffffff, #0c0c18);
  --color-surface: light-dark(#f5f5ff, #16162b);
  --color-text: light-dark(#111127, #ececf6);
  --color-text-muted: light-dark(#5a5a72, #9d9dbd);
  --color-border: light-dark(#e4e4f2, #28284a);
  --font-heading: 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.375rem;
  --text-4xl: 3.5rem;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-bold: 700;
  --leading-tight: 1.1;
  --leading-normal: 1.6;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;
  --radius: 0.75rem;
  --shadow: 0 1px 2px rgb(79 70 229 / 0.06), 0 6px 16px rgb(79 70 229 / 0.10), 0 20px 48px rgb(79 70 229 / 0.10);
  --container-width: 1120px;
}
Theme tokens add once per site, shared by every block
:root {
  color-scheme: light dark;
  --color-primary: light-dark(#0d9488, #2dd4bf);
  --color-accent: light-dark(#f97316, #fb923c);
  --color-bg: light-dark(#fbfaf8, #171412);
  --color-surface: light-dark(#f3f0ea, #221e1a);
  --color-text: light-dark(#292524, #ece7e0);
  --color-text-muted: light-dark(#6b6560, #a8a099);
  --color-border: light-dark(#e5dfd6, #37312a);
  --font-heading: Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.375rem;
  --text-4xl: 3.5rem;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-bold: 700;
  --leading-tight: 1.15;
  --leading-normal: 1.6;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;
  --radius: 1rem;
  --shadow: 0 2px 6px rgb(90 75 60 / 0.06), 0 10px 28px rgb(90 75 60 / 0.10);
  --container-width: 1120px;
}
HTML
<section class="s-hero-centered-text-only">
  <div class="hc-inner">
    <span class="hc-eyebrow"><span class="hc-dot"></span>Built for teams that ship</span>
    <h1 class="hc-title">The fastest way to a page you are proud of</h1>
    <p class="hc-lede">Design in the browser, export clean code, and move on. No accounts, no lock-in, no framework tax on your markup.</p>
    <div class="hc-actions">
      <a class="hc-btn hc-btn-primary" href="#">Start free</a>
      <a class="hc-btn hc-btn-ghost" href="#">Read the docs</a>
    </div>
    <p class="hc-note"><span class="hc-stars">★★★★★</span> 2,400+ developers already on board</p>
  </div>
</section>
CSS block only, works with any theme's tokens
.s-hero-centered-text-only {
  background:
    radial-gradient(48rem 26rem at 50% -14%, color-mix(in srgb, var(--color-primary) 9%, transparent), transparent 62%),
    var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  padding-block: var(--space-3xl);
}
.s-hero-centered-text-only .hc-inner {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: var(--space-lg);
  text-align: center;
}
.s-hero-centered-text-only .hc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
  background: color-mix(in srgb, var(--color-primary) 5%, var(--color-bg));
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  margin-bottom: var(--space-md);
}
.s-hero-centered-text-only .hc-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 22%, transparent);
}
.s-hero-centered-text-only .hc-title {
  font-family: var(--font-heading);
  text-wrap: balance;
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.025em;
  margin: 0 0 var(--space-md);
  background: linear-gradient(180deg, var(--color-text) 60%, color-mix(in srgb, var(--color-text) 40%, var(--color-primary)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.s-hero-centered-text-only .hc-lede {
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  text-wrap: pretty;
  color: var(--color-text-muted);
  margin: 0 auto var(--space-lg);
  max-width: 52ch;
}
.s-hero-centered-text-only .hc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}
.s-hero-centered-text-only .hc-btn {
  display: inline-flex;
  align-items: center;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.s-hero-centered-text-only .hc-btn-primary {
  background: var(--color-primary);
  color: var(--color-bg);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--color-text) 14%, transparent), 0 8px 20px color-mix(in srgb, var(--color-primary) 25%, transparent);
}
.s-hero-centered-text-only .hc-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px color-mix(in srgb, var(--color-text) 14%, transparent), 0 12px 28px color-mix(in srgb, var(--color-primary) 32%, transparent);
}
.s-hero-centered-text-only .hc-btn-ghost {
  color: var(--color-text);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}
.s-hero-centered-text-only .hc-btn-ghost:hover {
  border-color: color-mix(in srgb, var(--color-primary) 35%, var(--color-border));
  background: var(--color-surface);
}
.s-hero-centered-text-only .hc-note {
  margin: var(--space-lg) 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.s-hero-centered-text-only .hc-stars {
  color: var(--color-accent);
  letter-spacing: 0.12em;
  margin-right: var(--space-xs);
}
@media (max-width: 768px) {
  .s-hero-centered-text-only {
    padding-block: var(--space-2xl);
  }
  .s-hero-centered-text-only .hc-title {
    font-size: var(--text-3xl);
  }
}
Theme tokens add once per site, shared by every block
:root {
  color-scheme: light dark;
  --color-primary: light-dark(#18181b, #fafafa);
  --color-accent: light-dark(#4f46e5, #818cf8);
  --color-bg: light-dark(#ffffff, #0b0b0d);
  --color-surface: light-dark(#f7f7f8, #161619);
  --color-text: light-dark(#0a0a0c, #f5f5f6);
  --color-text-muted: light-dark(#52525b, #a1a1aa);
  --color-border: light-dark(#e4e4e7, #26262b);
  --font-heading: 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.375rem;
  --text-4xl: 3.5rem;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-bold: 700;
  --leading-tight: 1.1;
  --leading-normal: 1.6;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;
  --radius: 0.625rem;
  --shadow: 0 1px 2px rgb(10 10 12 / 0.05), 0 4px 12px rgb(10 10 12 / 0.06), 0 16px 40px rgb(10 10 12 / 0.06);
  --container-width: 1120px;
}
Theme tokens add once per site, shared by every block
:root {
  color-scheme: light dark;
  --color-primary: light-dark(#4f46e5, #818cf8);
  --color-accent: light-dark(#a855f7, #c084fc);
  --color-bg: light-dark(#ffffff, #0c0c18);
  --color-surface: light-dark(#f5f5ff, #16162b);
  --color-text: light-dark(#111127, #ececf6);
  --color-text-muted: light-dark(#5a5a72, #9d9dbd);
  --color-border: light-dark(#e4e4f2, #28284a);
  --font-heading: 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.375rem;
  --text-4xl: 3.5rem;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-bold: 700;
  --leading-tight: 1.1;
  --leading-normal: 1.6;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;
  --radius: 0.75rem;
  --shadow: 0 1px 2px rgb(79 70 229 / 0.06), 0 6px 16px rgb(79 70 229 / 0.10), 0 20px 48px rgb(79 70 229 / 0.10);
  --container-width: 1120px;
}
Theme tokens add once per site, shared by every block
:root {
  color-scheme: light dark;
  --color-primary: light-dark(#0d9488, #2dd4bf);
  --color-accent: light-dark(#f97316, #fb923c);
  --color-bg: light-dark(#fbfaf8, #171412);
  --color-surface: light-dark(#f3f0ea, #221e1a);
  --color-text: light-dark(#292524, #ece7e0);
  --color-text-muted: light-dark(#6b6560, #a8a099);
  --color-border: light-dark(#e5dfd6, #37312a);
  --font-heading: Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.375rem;
  --text-4xl: 3.5rem;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-bold: 700;
  --leading-tight: 1.15;
  --leading-normal: 1.6;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;
  --radius: 1rem;
  --shadow: 0 2px 6px rgb(90 75 60 / 0.06), 0 10px 28px rgb(90 75 60 / 0.10);
  --container-width: 1120px;
}
HTML
<section class="s-hero-centered-text-screenshot">
  <div class="hc-inner">
    <span class="hc-eyebrow"><span class="hc-dot"></span>Built for teams that ship</span>
    <h1 class="hc-title">The fastest way to a page you are proud of</h1>
    <p class="hc-lede">Design in the browser, export clean code, and move on. No accounts, no lock-in, no framework tax on your markup.</p>
    <div class="hc-actions">
      <a class="hc-btn hc-btn-primary" href="#">Start free</a>
      <a class="hc-btn hc-btn-ghost" href="#">Read the docs</a>
    </div>
  </div>
  <div class="hc-shot">
    <div class="hc-window">
      <div class="hc-window-bar"><span></span><span></span><span></span></div>
      <img src="data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%221040%22%20height%3D%22560%22%20viewBox%3D%220%200%201040%20560%22%20role%3D%22img%22%20aria-label%3D%22Screenshot%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22g%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%221%22%20y2%3D%221%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23f2f3f7%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23dfe2ea%22%2F%3E%3C%2FlinearGradient%3E%3Cpattern%20id%3D%22p%22%20width%3D%2256%22%20height%3D%2256%22%20patternUnits%3D%22userSpaceOnUse%22%3E%3Cpath%20d%3D%22M%2056%200%20L%200%200%200%2056%22%20fill%3D%22none%22%20stroke%3D%22%23c9cdd8%22%20stroke-opacity%3D%220.3%22%20stroke-width%3D%221%22%2F%3E%3C%2Fpattern%3E%3C%2Fdefs%3E%3Crect%20width%3D%221040%22%20height%3D%22560%22%20fill%3D%22url(%23g)%22%2F%3E%3Crect%20width%3D%221040%22%20height%3D%22560%22%20fill%3D%22url(%23p)%22%2F%3E%3Ccircle%20cx%3D%22520%22%20cy%3D%22259%22%20r%3D%2256%22%20fill%3D%22%23ffffff%22%20fill-opacity%3D%220.6%22%2F%3E%3Cpath%20d%3D%22M490.25%20273%20l21%20-26.25%20l15.75%2017.5%20l10.5%20-12.25%20l12.25%2021%20z%22%20fill%3D%22%23a2a8b8%22%2F%3E%3Ccircle%20cx%3D%22539.25%22%20cy%3D%22232.75%22%20r%3D%228.4%22%20fill%3D%22%23a2a8b8%22%2F%3E%3Ctext%20x%3D%2250%25%22%20y%3D%22346.5%22%20fill%3D%22%238a90a0%22%20font-family%3D%22system-ui%2C%20sans-serif%22%20font-size%3D%2235%22%20font-weight%3D%22600%22%20letter-spacing%3D%220.08em%22%20text-anchor%3D%22middle%22%3ESCREENSHOT%3C%2Ftext%3E%3C%2Fsvg%3E" alt="Product screenshot" width="1040" height="560" />
    </div>
  </div>
</section>
CSS block only, works with any theme's tokens
.s-hero-centered-text-screenshot {
  background:
    radial-gradient(52rem 28rem at 50% -14%, color-mix(in srgb, var(--color-primary) 9%, transparent), transparent 62%),
    linear-gradient(180deg, var(--color-bg) 70%, var(--color-surface)),
    var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  padding-block: var(--space-2xl);
}
.s-hero-centered-text-screenshot .hc-inner {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: var(--space-lg);
  text-align: center;
}
.s-hero-centered-text-screenshot .hc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
  background: color-mix(in srgb, var(--color-primary) 5%, var(--color-bg));
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  margin-bottom: var(--space-md);
}
.s-hero-centered-text-screenshot .hc-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 22%, transparent);
}
.s-hero-centered-text-screenshot .hc-title {
  font-family: var(--font-heading);
  text-wrap: balance;
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.025em;
  margin: 0 0 var(--space-md);
  background: linear-gradient(180deg, var(--color-text) 60%, color-mix(in srgb, var(--color-text) 40%, var(--color-primary)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.s-hero-centered-text-screenshot .hc-lede {
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  text-wrap: pretty;
  color: var(--color-text-muted);
  margin: 0 auto var(--space-lg);
  max-width: 52ch;
}
.s-hero-centered-text-screenshot .hc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}
.s-hero-centered-text-screenshot .hc-btn {
  display: inline-flex;
  align-items: center;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.s-hero-centered-text-screenshot .hc-btn-primary {
  background: var(--color-primary);
  color: var(--color-bg);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--color-text) 14%, transparent), 0 8px 20px color-mix(in srgb, var(--color-primary) 25%, transparent);
}
.s-hero-centered-text-screenshot .hc-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px color-mix(in srgb, var(--color-text) 14%, transparent), 0 12px 28px color-mix(in srgb, var(--color-primary) 32%, transparent);
}
.s-hero-centered-text-screenshot .hc-btn-ghost {
  color: var(--color-text);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}
.s-hero-centered-text-screenshot .hc-btn-ghost:hover {
  border-color: color-mix(in srgb, var(--color-primary) 35%, var(--color-border));
  background: var(--color-surface);
}
.s-hero-centered-text-screenshot .hc-shot {
  max-width: var(--container-width);
  margin: var(--space-xl) auto 0;
  padding-inline: var(--space-lg);
}
.s-hero-centered-text-screenshot .hc-window {
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--color-text) 10%, var(--color-border));
  background: var(--color-bg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.s-hero-centered-text-screenshot .hc-window-bar {
  display: flex;
  gap: 0.4rem;
  padding: 0.65rem 0.8rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.s-hero-centered-text-screenshot .hc-window-bar span {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-text) 14%, var(--color-border));
}
.s-hero-centered-text-screenshot .hc-window img {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 768px) {
  .s-hero-centered-text-screenshot .hc-title {
    font-size: var(--text-3xl);
  }
}

Baseline 2024 — works in every up-to-date browser.

Plus universally supported features: logical properties, custom properties. Baseline status is pulled from each feature's reference snippet.

ESC