行動喚起は、ページで説明を読み終えた利用者に、最後にもう一度行動を促します。独立した面に置くことで、ページの締めくくりだと伝わります。このブロックでは、ページで最も強い印象を与えるインク色のシートを、この用途に限って使います。
行動喚起
<section class="container-inline px-lg py-4xl" aria-labelledby="cta-title"> <div class="sheet sheet-inverse flex flex-col items-center gap-lg max-w(1040) mx-auto px-lg py-3xl text-center"> <h2 class="heading heading-2xl fg-text-inverse max-w(560)" id="cta-title"> Your next push could already be live. </h2> <p class="lead max-w(480) fg-text-inverse"> Connect a repository and deploy in under a minute. Free for personal projects. </p> <div class="flex flex-wrap justify-center gap-sm"> <a class="btn btn-lg" href="#">Start deploying</a> <a class="btn btn-quiet btn-lg fg-text-inverse" href="#"> Talk to sales<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></section>import ArrowRightIcon from '@master/icons-react/native/20/soft/arrow-right'<section className="container-inline px-lg py-4xl" aria-labelledby="cta-title"> <div className="sheet sheet-inverse flex flex-col items-center gap-lg max-w(1040) mx-auto px-lg py-3xl text-center"> <h2 className="heading heading-2xl fg-text-inverse max-w(560)" id="cta-title"> Your next push could already be live. </h2> <p className="lead max-w(480) fg-text-inverse"> Connect a repository and deploy in under a minute. Free for personal projects. </p> <div className="flex flex-wrap justify-center gap-sm"> <a className="btn btn-lg" href="#">Start deploying</a> <a className="btn btn-quiet btn-lg fg-text-inverse" href="#"> Talk to sales<ArrowRightIcon className="icon" /> </a> </div> </div></section><script> import ArrowRightIcon from '@master/icons-svelte/native/20/soft/arrow-right'</script><section class="container-inline px-lg py-4xl" aria-labelledby="cta-title"> <div class="sheet sheet-inverse flex flex-col items-center gap-lg max-w(1040) mx-auto px-lg py-3xl text-center"> <h2 class="heading heading-2xl fg-text-inverse max-w(560)" id="cta-title"> Your next push could already be live. </h2> <p class="lead max-w(480) fg-text-inverse"> Connect a repository and deploy in under a minute. Free for personal projects. </p> <div class="flex flex-wrap justify-center gap-sm"> <a class="btn btn-lg" href="#">Start deploying</a> <a class="btn btn-quiet btn-lg fg-text-inverse" href="#"> Talk to sales<ArrowRightIcon class="icon" /> </a> </div> </div></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="cta-title"> <div class="sheet sheet-inverse flex flex-col items-center gap-lg max-w(1040) mx-auto px-lg py-3xl text-center"> <h2 class="heading heading-2xl fg-text-inverse max-w(560)" id="cta-title"> Your next push could already be live. </h2> <p class="lead max-w(480) fg-text-inverse"> Connect a repository and deploy in under a minute. Free for personal projects. </p> <div class="flex flex-wrap justify-center gap-sm"> <a class="btn btn-lg" href="#">Start deploying</a> <a class="btn btn-quiet btn-lg fg-text-inverse" href="#"> Talk to sales<ArrowRightIcon class="icon" /> </a> </div> </div> </section></template>ブロックはコピーして使えるマークアップです。文字色と文字サイズは配置先のページに従います。プレビューでは body に fg-text-body text-sm を指定しています。各ブロックはサイズコンテナーで、自身の幅に応じてレイアウトが変わります。
#構成
sheet sheet-inverse。 moonstone ではインク色、obsidian ではパール色の面を使い、プライマリボタンと同じ光の当たり方にします。1 ページにつき 1 つ使います。- テキストには反転色。 見出しとリード文に
fg-text-inverseを適用します。見出しでは、見出し自体の色指定の後にユーティリティを置きます。 - 主アクションには既定のボタン。 インク色の面では、通常の立体的なボタンが最も明るく見えます。プライマリボタンを置くと、面と同じインク色になります。
- 説明は 1 文、主アクションは 1 つ。 まだ行動を決めていない利用者には、控えめな副アクションを添えます。
#控えめな表示
ページの終わりがすでに強調されている場合や、同じ行動を全ページで促す場合は、通常の質感を使います。トレイにシートを置き、先頭にテキスト、末尾にボタンを配置します。横に収まらなくなると、flex flex-wrap justify-between によってボタンがテキストの下に移ります。
控えめな表示
<section class="container-inline px-lg py-4xl" aria-labelledby="cta-quiet-title"> <div class="tray max-w(1040) mx-auto"> <div class="sheet flex flex-wrap items-center justify-between gap-lg p-xl"> <div class="flex flex-col gap-xs"> <h2 class="heading heading-lg" id="cta-quiet-title">Ready when you are.</h2> <p class="m(0) leading-md">Deploy your first project in under a minute. No card needed.</p> </div> <div class="flex flex-wrap gap-sm"> <a class="btn btn-primary" href="#">Start deploying</a> <a class="btn" href="#">Read the docs</a> </div> </div> </div></section><section className="container-inline px-lg py-4xl" aria-labelledby="cta-quiet-title"> <div className="tray max-w(1040) mx-auto"> <div className="sheet flex flex-wrap items-center justify-between gap-lg p-xl"> <div className="flex flex-col gap-xs"> <h2 className="heading heading-lg" id="cta-quiet-title">Ready when you are.</h2> <p className="m(0) leading-md"> Deploy your first project in under a minute. No card needed. </p> </div> <div className="flex flex-wrap gap-sm"> <a className="btn btn-primary" href="#">Start deploying</a> <a className="btn" href="#">Read the docs</a> </div> </div> </div></section><section class="container-inline px-lg py-4xl" aria-labelledby="cta-quiet-title"> <div class="tray max-w(1040) mx-auto"> <div class="sheet flex flex-wrap items-center justify-between gap-lg p-xl"> <div class="flex flex-col gap-xs"> <h2 class="heading heading-lg" id="cta-quiet-title">Ready when you are.</h2> <p class="m(0) leading-md">Deploy your first project in under a minute. No card needed.</p> </div> <div class="flex flex-wrap gap-sm"> <a class="btn btn-primary" href="#">Start deploying</a> <a class="btn" href="#">Read the docs</a> </div> </div> </div></section><template> <section class="container-inline px-lg py-4xl" aria-labelledby="cta-quiet-title"> <div class="tray max-w(1040) mx-auto"> <div class="sheet flex flex-wrap items-center justify-between gap-lg p-xl"> <div class="flex flex-col gap-xs"> <h2 class="heading heading-lg" id="cta-quiet-title">Ready when you are.</h2> <p class="m(0) leading-md"> Deploy your first project in under a minute. No card needed. </p> </div> <div class="flex flex-wrap gap-sm"> <a class="btn btn-primary" href="#">Start deploying</a> <a class="btn" href="#">Read the docs</a> </div> </div> </div> </section></template>#入力欄付き
メールアドレスの入力を促す場合は、入力欄とボタンを折り返し可能な行に置きます。grow(1) basis(200) で入力欄の基準幅を 200px にし、行に空きがあれば広げます。200px の入力欄とボタンが同じ行に収まらなくなると、ボタンが次の行に移ります。
入力欄付き
<section class="container-inline px-lg py-4xl" aria-labelledby="cta-form-title"> <div class="flex flex-col items-center gap-lg max-w(520) mx-auto text-center"> <h2 class="heading heading-2xl" id="cta-form-title">One email when something ships.</h2> <p class="lead">The changelog, about twice a month. Nothing else, and one click to stop.</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">Subscribe</button> </form> </div></section><section className="container-inline px-lg py-4xl" aria-labelledby="cta-form-title"> <div className="flex flex-col items-center gap-lg max-w(520) mx-auto text-center"> <h2 className="heading heading-2xl" id="cta-form-title">One email when something ships.</h2> <p className="lead">The changelog, about twice a month. Nothing else, and one click to stop.</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">Subscribe</button> </form> </div></section><section class="container-inline px-lg py-4xl" aria-labelledby="cta-form-title"> <div class="flex flex-col items-center gap-lg max-w(520) mx-auto text-center"> <h2 class="heading heading-2xl" id="cta-form-title">One email when something ships.</h2> <p class="lead">The changelog, about twice a month. Nothing else, and one click to stop.</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">Subscribe</button> </form> </div></section><template> <section class="container-inline px-lg py-4xl" aria-labelledby="cta-form-title"> <div class="flex flex-col items-center gap-lg max-w(520) mx-auto text-center"> <h2 class="heading heading-2xl" id="cta-form-title">One email when something ships.</h2> <p class="lead">The changelog, about twice a month. Nothing else, and one click to stop.</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">Subscribe</button> </form> </div> </section></template>#アクセシビリティ
- 反転色のシートは、どちらの配色でもテキストに十分なコントラストを確保します。背景色と文字色には、テーマで定義された反転色の組み合わせを使います。
- 入力欄にはアクセシブルな名前が必要です。この例では
aria-label="Email"を使っています。スペースに余裕があれば、ラベルを画面に表示する方が適切です。 - クリック後に何が起きるかをボタンの文言で伝えます。「デプロイを開始」なら、実行される操作が「送信」より明確です。