Website pieces
Hero
The first part of a website’s home page: a short tag, the big heading, one sentence, and one or two actions. .kui-hero holds a .kui-container and .kui-hero__inner.
Examples
Start-aligned, with a picture of the product
The heading is at most 18 characters wide per line, so it breaks into two or three strong lines. <em> marks the one highlighted phrase in the accent. On a real page the heading is the page’s <h1>.
New: e-invoices for Serbia
Invoices that send themselves
Write an invoice once. Konstruktor sends it, reminds the client, and matches the payment from your bank statement.
Open14
Overdue3
Paid this month1.84M RSD
HTML
<section class="kui-hero" aria-labelledby="hero-1-title">
<div class="kui-container">
<div class="kui-hero__inner">
<a class="kui-pill-tag" href="#hero-news">New: e-invoices for Serbia</a>
<h2 class="kui-hero__title" id="hero-1-title">Invoices that <em>send themselves</em></h2>
<p class="kui-lead">Write an invoice once. Konstruktor sends it, reminds the client, and matches the payment from your bank statement.</p>
<div class="kui-hero__actions">
<a class="kui-button kui-button--strong kui-button--lg" href="#hero-start">Start free</a>
<a class="kui-button kui-button--lg" href="#hero-demo"><svg class="kui-icon" aria-hidden="true"><use href="kit/icons.svg#play"></use></svg><span>Watch the demo</span></a>
</div>
</div>
<div class="kui-hero__media kui-hero__media--inset">
<div class="kui-stats">
<div class="kui-stat"><span class="kui-stat__label">Open</span><span class="kui-stat__value">14</span></div>
<div class="kui-stat"><span class="kui-stat__label">Overdue</span><span class="kui-stat__value">3</span></div>
<div class="kui-stat"><span class="kui-stat__label">Paid this month</span><span class="kui-stat__value">1.84<small>M RSD</small></span></div>
</div>
</div>
</div>
</section>
Centred
.kui-hero--center centres everything. Use it when there is no picture beside or under the text.
Za knjigovodstvene agencije
Knjigovodstvo bez papira
Klijenti šalju račune fotografijom. Vi dobijate gotove stavke za knjiženje, s PDV-om i datumom dospeća.
HTML
<section class="kui-hero kui-hero--center" lang="sr-Latn" aria-labelledby="hero-2-title">
<div class="kui-container">
<div class="kui-hero__inner">
<span class="kui-eyebrow">Za knjigovodstvene agencije</span>
<h2 class="kui-hero__title" id="hero-2-title">Knjigovodstvo bez papira</h2>
<p class="kui-lead">Klijenti šalju račune fotografijom. Vi dobijate gotove stavke za knjiženje, s PDV-om i datumom dospeća.</p>
<div class="kui-hero__actions">
<a class="kui-button kui-button--strong kui-button--lg" href="#hero-try">Probajte 30 dana</a>
<a class="kui-button kui-button--ghost kui-button--lg" href="#hero-price">Cene</a>
</div>
</div>
</div>
</section>
Classes and attributes
.kui-hero- The section. Vertical space comes from the section spacing token.
.kui-hero--center- Centres the tag, heading, text and actions.
.kui-hero__inner- The column of tag, heading, lead and actions.
.kui-hero__title- The big heading. em inside it is shown in the accent colour, upright.
.kui-hero__actions- The row of one or two buttons.
.kui-hero__media, --inset- A framed picture or a piece of the product under the text. --inset adds inner space for live markup instead of an image.
.kui-pill-tag- A small rounded link above the heading, for one piece of news.
Accessibility
- The hero heading is the page’s only h1. The tag above it is a link or plain text, never a heading.
- The highlighted phrase is em, so a screen reader can stress it; its colour is the accent text colour, which keeps 4.5:1.
- A picture of the product needs alt text that says what it shows, or alt="" when the text already says it.
Do and do not
Do
- Say what the product does in the heading, in words a client uses.
- Keep one strong action and at most one quiet one.
Do not
- Do not put a carousel in the hero.
- Do not start the heading with the product’s name.