Hero

<div class="asp-hero">
  <div class="container">
    <div class="asp-grid">
      <div class="asp-grid__item asp-grid__item--large-three-quarters asp-grid__item--extra-large-two-thirds">
        <div class="asp-hero__content">
          <h1>Hero title</h1>
          <p>Hero content (html).</p>
                <p>With additional line.</p>
        </div>
      </div>
    </div>
  </div>
</div>
Nunjucks macro options

Use options to customise the appearance, content and behaviour of a component when using a macro, for example, changing the text.

Some options are required for the macro to work; these are marked as "Required" in the option description.

If you're using Nunjucks macros in production with "html" options, or ones ending with "html", you must sanitise the HTML to protect against cross-site scripting exploits.

Name Type Description
title string Required. The hero component title.
content array Required. The hero component content. See content.

Options for content

Name Type Description
html string Required. HTML for the hero component content. If 'html' is provided, the 'text' parameter will be ignored.
text string Required. Text for the hero component content. If 'html' is provided, the 'text' parameter will be ignored.
{% from "hero/macro.njk" import aspHero %}

{{ aspHero({
title: "Hero title",
content: {
html: '<p>Hero content (html).</p>
<p>With additional line.</p>' }
}) }}

Status of development

The below criteria all need to be met for a component to be considered as fully developed for use within the ASP Digital Design System.

Development criteria Status
WCAG 2.2 compliant Not started
WCAG 2.1 compliant Completed
HTML / Nunjucks version Completed
Figma version Not started
M365 versions Not started
Documentation In progress

Published 3 May 2024
Last updated 13 September 2024