ナビゲーション

v2.1.0
マーケティング用ブロック

ヒーロー

ページを開いて最初に見える領域で、何を紹介するのか、その価値、次に取ってほしい行動をひとつ伝えます。

ヒーローはページを開いて最初に見える領域です。何を紹介するのか、その価値、次に取ってほしい行動をひとつ伝えます。テキストは、ブロック幅に応じて大きさが変わるディスプレイサイズの見出しと、その下のリード文で構成します。ほかの要素は任意です。

ヒーロー

<section class="container-inline px-lg py-4xl" aria-labelledby="hero-title">  <div class="flex flex-col items-center gap-lg max-w(760) mx-auto text-center">    <a class="badge badge-raised badge-pill" href="#">      New: preview comments<svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <path d="M13.6362 7.5189A0.4947 0.4947 0 0 0 13.5 7.5L2.4755 7.5006A0.5 0.5 0 0 0 2.4266 8.4946L2.5 8.5H13.5A0.4947 0.4947 0 0 0 13.6362 8.4811A0.7009 0.7009 0 0 0 13.6362 7.5189Z" fill="currentColor" stroke="none" fill-rule="evenodd" /><path d="M8 4.5L13.2348 7.8313A0.2 0.2 0 0 1 13.2348 8.1687L8 11.5" />      </svg>    </a>    <h1 class="heading heading-display" id="hero-title">Ship the web, quietly.</h1>    <p class="lead lead-lg max-w(560)">      Atlas turns every push into a deployment with its own address, in fourteen regions, in under a minute.    </p>    <div class="flex flex-wrap justify-center gap-sm">      <a class="btn btn-brand btn-lg" href="#">Start deploying</a>      <a class="btn btn-lg" href="#">Read the docs</a>    </div>    <p class="m(0) text-xs fg-text-muted">Free for personal projects. No card needed.</p>  </div></section>
import ArrowRightIcon from '@master/icons-react/native/16/soft/arrow-right'<section className="container-inline px-lg py-4xl" aria-labelledby="hero-title">  <div className="flex flex-col items-center gap-lg max-w(760) mx-auto text-center">    <a className="badge badge-raised badge-pill" href="#">      New: preview comments<ArrowRightIcon className="icon" />    </a>    <h1 className="heading heading-display" id="hero-title">Ship the web, quietly.</h1>    <p className="lead lead-lg max-w(560)">      Atlas turns every push into a deployment with its own address, in fourteen regions, in under a minute.    </p>    <div className="flex flex-wrap justify-center gap-sm">      <a className="btn btn-brand btn-lg" href="#">Start deploying</a>      <a className="btn btn-lg" href="#">Read the docs</a>    </div>    <p className="m(0) text-xs fg-text-muted">Free for personal projects. No card needed.</p>  </div></section>
<script>  import ArrowRightIcon from '@master/icons-svelte/native/16/soft/arrow-right'</script><section class="container-inline px-lg py-4xl" aria-labelledby="hero-title">  <div class="flex flex-col items-center gap-lg max-w(760) mx-auto text-center">    <a class="badge badge-raised badge-pill" href="#">      New: preview comments<ArrowRightIcon class="icon" />    </a>    <h1 class="heading heading-display" id="hero-title">Ship the web, quietly.</h1>    <p class="lead lead-lg max-w(560)">      Atlas turns every push into a deployment with its own address, in fourteen regions, in under a minute.    </p>    <div class="flex flex-wrap justify-center gap-sm">      <a class="btn btn-brand btn-lg" href="#">Start deploying</a>      <a class="btn btn-lg" href="#">Read the docs</a>    </div>    <p class="m(0) text-xs fg-text-muted">Free for personal projects. No card needed.</p>  </div></section>
<script setup>import ArrowRightIcon from '@master/icons-vue/native/16/soft/arrow-right'</script><template>  <section class="container-inline px-lg py-4xl" aria-labelledby="hero-title">    <div class="flex flex-col items-center gap-lg max-w(760) mx-auto text-center">      <a class="badge badge-raised badge-pill" href="#">        New: preview comments<ArrowRightIcon class="icon" />      </a>      <h1 class="heading heading-display" id="hero-title">Ship the web, quietly.</h1>      <p class="lead lead-lg max-w(560)">        Atlas turns every push into a deployment with its own address, in fourteen regions, in under a minute.      </p>      <div class="flex flex-wrap justify-center gap-sm">        <a class="btn btn-brand btn-lg" href="#">Start deploying</a>        <a class="btn btn-lg" href="#">Read the docs</a>      </div>      <p class="m(0) text-xs fg-text-muted">Free for personal projects. No card needed.</p>    </div>  </section></template>

ブロックはコピーして使えるマークアップです。テキストの色とサイズは配置先のページに従います。プレビューでは body 要素に fg-text-body text-sm を設定しています。各ブロックはサイズコンテナーで、自身の幅に応じてレイアウトが変わります。

#構成

  • カラムの最大幅を揃えて中央に配置。 gap-lg を指定したカラムに max-w(760) mx-auto text-center を適用します。リード文の幅は個別に狭く設定し、見出しが横に広がってもリード文の各行が長くなりすぎないようにします。
  • ディスプレイサイズの見出し。 heading heading-display のサイズにはコンテナー単位を使います。スマートフォンのカラムでは 2.5rem、幅の広いカラムでは 4.25rem になり、どのサイズでも各行の長さが均等になるように折り返します。セクションがコンテナーになります。
  • アクションは最大2つ。 主アクションには btn-brand または btn-primary を使い、副アクションには既定または控えめなスタイルのボタンを使います。flex flex-wrap justify-center を使うと、画面が狭い場合にクエリーなしで縦に並びます。
  • 利用前の不安を和らげるひと言。 試すのにどんな負担があるかを text-xs fg-text-muted で示します。

ブランドボタンは、このデザインシステムで唯一、色味を持つ操作要素です。ヒーローに使う場合は、最初の画面にあるほかの操作要素には色味を持たせません。

#画像付き

テキストの下に図版を置き、プリントを額装するマットのように、トレイで図版を囲みます。読み込み時にページのレイアウトがずれないよう、--figure-ratio で画像のアスペクト比を指定します。

画像付き

<section class="container-inline px-lg py-4xl" aria-labelledby="hero-media-title">  <div class="flex flex-col items-center gap-lg max-w(760) mx-auto text-center">    <p class="eyebrow">Deployments</p>    <h1 class="heading heading-display" id="hero-media-title">Every push gets an address.</h1>    <p class="lead max-w(520)">      Open a pull request and share the link. What you review is what ships.    </p>    <div class="flex flex-wrap justify-center gap-sm">      <a class="btn btn-primary btn-lg" href="#">Start deploying</a>      <a class="btn btn-quiet btn-lg" href="#">        See how it works<svg class="icon" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">          <path d="M17.2077 9.4105A0.6234 0.6234 0 0 0 17 9.375L2.9693 9.3758A0.625 0.625 0 0 0 2.9083 10.6182L3 10.625H17A0.6234 0.6234 0 0 0 17.2077 10.5895A0.8258 0.8258 0 0 0 17.2077 9.4105Z" fill="currentColor" stroke="none" fill-rule="evenodd" /><path d="M10 5.5L16.7383 9.8318A0.2 0.2 0 0 1 16.7383 10.1682L10 14.5" />        </svg>      </a>    </div>  </div>  <figure class="figure figure-framed max-w(1040) mx-auto mt-3xl">    <img class="figure-media" src="/demo/scenes/wallpaper-dawn-silk-16x9.webp" alt width="2000" height="1125" style="--figure-ratio: 16 / 9">  </figure></section>
import ArrowRightIcon from '@master/icons-react/native/20/soft/arrow-right'<section className="container-inline px-lg py-4xl" aria-labelledby="hero-media-title">  <div className="flex flex-col items-center gap-lg max-w(760) mx-auto text-center">    <p className="eyebrow">Deployments</p>    <h1 className="heading heading-display" id="hero-media-title">Every push gets an address.</h1>    <p className="lead max-w(520)">      Open a pull request and share the link. What you review is what ships.    </p>    <div className="flex flex-wrap justify-center gap-sm">      <a className="btn btn-primary btn-lg" href="#">Start deploying</a>      <a className="btn btn-quiet btn-lg" href="#">        See how it works<ArrowRightIcon className="icon" />      </a>    </div>  </div>  <figure className="figure figure-framed max-w(1040) mx-auto mt-3xl">    <img className="figure-media" src="/demo/scenes/wallpaper-dawn-silk-16x9.webp" alt="" width="2000" height="1125" style={{ '--figure-ratio': '16 / 9' } as React.CSSProperties} />  </figure></section>
<script>  import ArrowRightIcon from '@master/icons-svelte/native/20/soft/arrow-right'</script><section class="container-inline px-lg py-4xl" aria-labelledby="hero-media-title">  <div class="flex flex-col items-center gap-lg max-w(760) mx-auto text-center">    <p class="eyebrow">Deployments</p>    <h1 class="heading heading-display" id="hero-media-title">Every push gets an address.</h1>    <p class="lead max-w(520)">      Open a pull request and share the link. What you review is what ships.    </p>    <div class="flex flex-wrap justify-center gap-sm">      <a class="btn btn-primary btn-lg" href="#">Start deploying</a>      <a class="btn btn-quiet btn-lg" href="#">See how it works<ArrowRightIcon class="icon" /></a>    </div>  </div>  <figure class="figure figure-framed max-w(1040) mx-auto mt-3xl">    <img class="figure-media" src="/demo/scenes/wallpaper-dawn-silk-16x9.webp" alt width="2000" height="1125" style="--figure-ratio: 16 / 9">  </figure></section>
<script setup>import ArrowRightIcon from '@master/icons-vue/native/20/soft/arrow-right'</script><template>  <section class="container-inline px-lg py-4xl" aria-labelledby="hero-media-title">    <div class="flex flex-col items-center gap-lg max-w(760) mx-auto text-center">      <p class="eyebrow">Deployments</p>      <h1 class="heading heading-display" id="hero-media-title">Every push gets an address.</h1>      <p class="lead max-w(520)">        Open a pull request and share the link. What you review is what ships.      </p>      <div class="flex flex-wrap justify-center gap-sm">        <a class="btn btn-primary btn-lg" href="#">Start deploying</a>        <a class="btn btn-quiet btn-lg" href="#">See how it works<ArrowRightIcon class="icon" /></a>      </div>    </div>    <figure class="figure figure-framed max-w(1040) mx-auto mt-3xl">      <img class="figure-media" src="/demo/scenes/wallpaper-dawn-silk-16x9.webp" alt width="2000" height="1125" style="--figure-ratio: 16 / 9">    </figure>  </section></template>

#2カラム

ブロック幅が 64rem 以上になると、grid-cols(2)@container(--5xl) でテキストと画像を横に並べます。それより狭い場合は、テキストを先にして縦に並べます。先頭のカラムは始端揃えで、フォームの配置に適しています。この例では、メールアドレス入力欄とボタンを置き、その下に利用前の不安を和らげる3項目を箇条書きで横に並べ、必要に応じて折り返します。

2カラム

<section class="container-inline px-lg py-4xl" aria-labelledby="hero-split-title">  <div class="grid gap-2xl items-center max-w(1120) mx-auto grid-cols(2)@container(--5xl)">    <div class="flex flex-col items-start gap-lg">      <p class="eyebrow">Analytics</p>      <h1 class="heading heading-display" id="hero-split-title">        Know what is slow before your visitors do.      </h1>      <p class="lead max-w(480)">        Real traffic and real speed, measured at the edge. No cookies and no banner to dismiss.      </p>      <form class="flex flex-wrap gap-xs w-full max-w(420)">        <input class="input grow(1) basis(200)" type="email" name="email" placeholder="you@example.com" aria-label="Email" autocomplete="email" required>        <button class="btn btn-primary">Get early access</button>      </form>      <ul class="bullets bullets-check flex flex-wrap col-gap-md row-gap-2xs text-xs fg-text-muted">        <li class="bullets-item">No card needed</li>        <li class="bullets-item">14 regions</li>        <li class="bullets-item">Cancel any time</li>      </ul>    </div>    <figure class="figure figure-framed">      <img class="figure-media" src="/demo/scenes/wallpaper-stone-mist-3x2.webp" alt width="2000" height="1333" style="--figure-ratio: 3 / 2">    </figure>  </div></section>
<section className="container-inline px-lg py-4xl" aria-labelledby="hero-split-title">  <div className="grid gap-2xl items-center max-w(1120) mx-auto grid-cols(2)@container(--5xl)">    <div className="flex flex-col items-start gap-lg">      <p className="eyebrow">Analytics</p>      <h1 className="heading heading-display" id="hero-split-title">        Know what is slow before your visitors do.      </h1>      <p className="lead max-w(480)">        Real traffic and real speed, measured at the edge. No cookies and no banner to dismiss.      </p>      <form className="flex flex-wrap gap-xs w-full max-w(420)">        <input className="input grow(1) basis(200)" type="email" name="email" placeholder="you@example.com" aria-label="Email" autoComplete="email" required />        <button className="btn btn-primary">Get early access</button>      </form>      <ul className="bullets bullets-check flex flex-wrap col-gap-md row-gap-2xs text-xs fg-text-muted">        <li className="bullets-item">No card needed</li>        <li className="bullets-item">14 regions</li>        <li className="bullets-item">Cancel any time</li>      </ul>    </div>    <figure className="figure figure-framed">      <img className="figure-media" src="/demo/scenes/wallpaper-stone-mist-3x2.webp" alt="" width="2000" height="1333" style={{ '--figure-ratio': '3 / 2' } as React.CSSProperties} />    </figure>  </div></section>
<section class="container-inline px-lg py-4xl" aria-labelledby="hero-split-title">  <div class="grid gap-2xl items-center max-w(1120) mx-auto grid-cols(2)@container(--5xl)">    <div class="flex flex-col items-start gap-lg">      <p class="eyebrow">Analytics</p>      <h1 class="heading heading-display" id="hero-split-title">        Know what is slow before your visitors do.      </h1>      <p class="lead max-w(480)">        Real traffic and real speed, measured at the edge. No cookies and no banner to dismiss.      </p>      <form class="flex flex-wrap gap-xs w-full max-w(420)">        <input class="input grow(1) basis(200)" type="email" name="email" placeholder="you@example.com" aria-label="Email" autocomplete="email" required>        <button class="btn btn-primary">Get early access</button>      </form>      <ul class="bullets bullets-check flex flex-wrap col-gap-md row-gap-2xs text-xs fg-text-muted">        <li class="bullets-item">No card needed</li>        <li class="bullets-item">14 regions</li>        <li class="bullets-item">Cancel any time</li>      </ul>    </div>    <figure class="figure figure-framed">      <img class="figure-media" src="/demo/scenes/wallpaper-stone-mist-3x2.webp" alt width="2000" height="1333" style="--figure-ratio: 3 / 2">    </figure>  </div></section>
<template>  <section class="container-inline px-lg py-4xl" aria-labelledby="hero-split-title">    <div class="grid gap-2xl items-center max-w(1120) mx-auto grid-cols(2)@container(--5xl)">      <div class="flex flex-col items-start gap-lg">        <p class="eyebrow">Analytics</p>        <h1 class="heading heading-display" id="hero-split-title">          Know what is slow before your visitors do.        </h1>        <p class="lead max-w(480)">          Real traffic and real speed, measured at the edge. No cookies and no banner to dismiss.        </p>        <form class="flex flex-wrap gap-xs w-full max-w(420)">          <input class="input grow(1) basis(200)" type="email" name="email" placeholder="you@example.com" aria-label="Email" autocomplete="email" required>          <button class="btn btn-primary">Get early access</button>        </form>        <ul class="bullets bullets-check flex flex-wrap col-gap-md row-gap-2xs text-xs fg-text-muted">          <li class="bullets-item">No card needed</li>          <li class="bullets-item">14 regions</li>          <li class="bullets-item">Cancel any time</li>        </ul>      </div>      <figure class="figure figure-framed">        <img class="figure-media" src="/demo/scenes/wallpaper-stone-mist-3x2.webp" alt width="2000" height="1333" style="--figure-ratio: 3 / 2">      </figure>    </div>  </section></template>

#アクセシビリティ

  • ヒーローのタイトルをページの <h1> にします。ページにひとつだけ設けます。
  • 見出しの上に添える短いラベルは、後に続く内容の種類を示します。見出しとしてマークアップせず、<p> を使います。スクリーンリーダーの見出し一覧では、ページタイトルが先頭に来るようにします。
  • 別の場所に移動するボタンにはリンクの <a class="btn"> を使います。フォームを送信するボタンには <button> を使います。
  • 各セクションには、aria-labelledby でそのタイトルを名前として関連付けます。
  • 画像が製品を示す場合は alt にその内容を記述し、雰囲気を演出するだけの場合は空にします。これらの例では、画像は雰囲気を演出するためのものなので、alt は空にしています。
  • 入力欄がひとつだけの場合も aria-label を付けます。required を指定すると、送信前にブラウザーが未入力の項目を知らせます。