Hero
A strong first impression. An introduction, a headline, and a clear next step.
<div class="hero centered">
<div><div>
<span class="badge accent">Made for the web</span>
<h2>Less framework.<br>More possibility.</h2>
<p>Start with HTML. Add only what you need. Make something that feels like you.</p>
<a href="#get-started">Start building</a>
</div></div>
</div>.hero { padding: clamp(2rem, 6vw, 5rem); border-radius: var(--radius); background: var(--muted); }
.hero h1, .hero h2 { max-width: 16ch; margin-block: 0 1.2rem; }
.hero p { color: var(--muted-foreground); max-width: 52ch; }
.hero.centered { text-align: center; }
.hero.centered :is(h1, h2, p) { margin-inline: auto; }
.hero.split > div { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.hero.minimal { background: transparent; padding-inline: 0; }
.hero img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; }
@media (width < 768px) { .hero.split > div { grid-template-columns: 1fr; } }export default function decorate(block) {
block.querySelectorAll('a').forEach((link, index) => link.classList.add(index ? 'button-secondary' : 'button'));
}Installation
Run the source CLI from a Blocks UI checkout. This package is not published to npm.
node packages/cli/index.js add heroOr copy the source files above. Include tokens.css and base.css once in your project.
Usage
Use the authored row-and-column structure, then let the standalone runtime discover and enhance the block.
<div class="hero centered">
<div><div>
<span class="badge accent">Made for the web</span>
<h2>Less framework.<br>More possibility.</h2>
<p>Start with HTML. Add only what you need. Make something that feels like you.</p>
<a href="#get-started">Start building</a>
</div></div>
</div>import decorate from './blocks/hero/hero.js';
document.querySelectorAll('.hero').forEach(decorate);Variants
Choose a variant in the live preview. Add its class to the authored block.
defaultcenteredsplitminimalAccessibility & behavior
Semantic HTML, visible focus states, shared contrast-aware tokens, and responsive styles provide an accessible foundation. Preserve labels and heading hierarchy when customizing.
Multiple instances are supported. Layouts adapt to smaller viewports. No npm dependencies are required at runtime.
AEM usage
Copy the canonical CSS and JavaScript into your EDS block folder. Use the same row-and-column authoring structure shown above and let your existing AEM loader call the default decorator.
Standalone verified. EDS markup compatible. Live AEM integration has not been verified.