Page intro, in the default slot: an h1, a lede, the actions, the facts, and anything after, such as an install norn-code-block. Write the h1 as one or two <span>s: the name, then a tagline in the accent color. The actions are a <nav aria-labelledby="…">, pointing at a hidden name, holding a <ul role="list"> of norn-link-buttons, and the facts a norn-fact-list with @gap="l".
<norn-hero>
a container, from
@allons-y/webc-patterns
<norn-hero>
<h1><span>Example project</span> <span>A short line about what it does</span></h1>
<p>Greet anyone by name, from code or from the command line, with no setup.</p>
<nav aria-label="Get started">
<ul role="list">
<li><norn-link-button @href="#install">Get started</norn-link-button></li>
<li><norn-link-button @href="https://example.com/" @variant="secondary">View on GitHub</norn-link-button></li>
</ul>
</nav>
<norn-fact-list @gap="l">
<li><norn-icon @name="check"></norn-icon>Free & open source</li>
<li><norn-icon @name="check"></norn-icon>License: MPL-2.0</li>
<li><norn-icon @name="check"></norn-icon>Node 24+</li>
</norn-fact-list>
<norn-code-block @language="sh" @code="$ npm install @example/project"></norn-code-block>
</norn-hero>
Copy {name} to clipboardCopyCopiedCopy failedhtml code
<div style="display: grid; gap: 1.5rem">
<div style="display: grid; gap: 0.5rem">
<p><code>width = layout</code></p>
<div>
<norn-hero @width="layout"><p>Greet anyone by name, from code or from the command line, with no setup.</p></norn-hero>
</div>
</div>
<div style="display: grid; gap: 0.5rem">
<p><code>width = measure</code></p>
<div>
<norn-hero @width="measure"><p>Greet anyone by name, from code or from the command line, with no setup.</p></norn-hero>
</div>
</div>
</div>
Copy {name} to clipboardCopyCopiedCopy failedhtml code
Props
Write them with the @ prefix, and :@ for an expression.
Name
Type
Description
@width
string
Content width: layout, --norn-layout-width, or measure, the prose line length, --norn-text-measure. Falls back to layout.
Slots
Name
Description
default
The h1, lede, actions, facts, and extras, in that order.
Tokens
The global tokens from tokens.json the component reads. Set one in a project's tokens.css to change it everywhere.
Type a value to try it in every example above. Reset puts the default back.
Token
Type
Default
Override
--norn-ui-accentThe brand color, shared by every component.
<color>
#2346d4
--norn-text-mutedSecondary text color.
<color>
light-dark(#4b5160, #a4abba)
--norn-text-accentThe accent for text and links: darkened in light mode, lightened in dark mode. The lightness caps keep any accent at 4.5:1 or better.