Hero

A strong first impression. An introduction, a headline, and a clear next step.

Installation

Run the source CLI from a Blocks UI checkout. This package is not published to npm.

node packages/cli/index.js add hero

Or 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.

defaultcenteredsplitminimal

Accessibility & 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.

Compatibility

Standalone verified. EDS markup compatible. Live AEM integration has not been verified.

Edit this example on GitHub

Search documentation

Search the docs, components, and blocks. Use Tab to select a result.