本文へ移動
セクション
言語、現在は日本語
Rastrillo デザインシステム

画面

サインイン画面は同梱の signin 部品そのもので、その各状態を示しています。最後のふたつはコピーして使う例です。

どの例も実際に動きますが、リンクはどこにも移動しません。

signin signin-title live-head

サインイン

入り口はひとつを目立たせ、残りはその下に置きます。新規登録とサインインを分けないでください。両方に効くボタンひとつのほうが、説明も間違いも少なくなります。

アドレスを尋ねる

入力欄ひとつとボタンひとつ。覚えるものも盗まれるものもありません。rastrillo は最初からこれに対応しています。

プレビュー
{{define "title"}}{{template "signin-title" (dict "State" .Signin "Brand" .Brand)}}{{end}}
{{define "content"}}{{template "signin" (dict "State" .Signin "Brand" .Brand)}}{{end}}

Keymail で戻ってくる

ブラウザは前回どうやって入ったかを覚えています。ワンタップで記憶したアドレスを送り、それは最初から改めて確認されます。

プレビュー
{{define "title"}}{{template "signin-title" (dict "State" .Signin "Brand" .Brand)}}{{end}}
{{define "content"}}{{template "signin" (dict "State" .Signin "Brand" .Brand)}}{{end}}

パスキー

持っている人にとっては最速で、入力するものもありません。第二の方法も用意してください。端末はなくなるものですし、使えないパスキーは施錠された扉です。

プレビュー
{{define "title"}}{{template "signin-title" (dict "State" .Signin "Brand" .Brand)}}{{end}}
{{define "content"}}{{template "signin" (dict "State" .Signin "Brand" .Brand)}}{{end}}

リンクを送ったあと

入力されたアドレスをそのまま返して見せます。決して届かないメールを待ち始める前に、打ち間違いに気づける唯一の機会です。

プレビュー
{{define "title"}}{{template "signin-title" (dict "State" .Signin "Brand" .Brand)}}{{end}}
{{define "content"}}{{template "signin" (dict "State" .Signin "Brand" .Brand)}}{{end}}

リンクを送ったあと、別のブラウザで

このブラウザがアドレスを送っていないときは、ページはそれを推測しません。

プレビュー
{{define "title"}}{{template "signin-title" (dict "State" .Signin "Brand" .Brand)}}{{end}}
{{define "content"}}{{template "signin" (dict "State" .Signin "Brand" .Brand)}}{{end}}

Keymail を示したのにリンクが送られたとき

今回はリンクを送ったと一行で伝えます。理由は推測しません。

プレビュー
{{define "title"}}{{template "signin-title" (dict "State" .Signin "Brand" .Brand)}}{{end}}
{{define "content"}}{{template "signin" (dict "State" .Signin "Brand" .Brand)}}{{end}}

Keymail へ移動中

ページは自動で先へ進みます。進まなかったときのためにリンクもあります。

プレビュー
{{define "title"}}{{template "signin-title" (dict "State" .Signin "Brand" .Brand)}}{{end}}
{{define "content"}}{{template "signin" (dict "State" .Signin "Brand" .Brand)}}{{end}}

正しく見えないアドレス

メッセージは入力欄に属し、フォーカスもそこから始まります。

プレビュー
{{define "title"}}{{template "signin-title" (dict "State" .Signin "Brand" .Brand)}}{{end}}
{{define "content"}}{{template "signin" (dict "State" .Signin "Brand" .Brand)}}{{end}}

Keymail で確認できなかったとき

ボタンが代わりにリンクを送るものに変わるので、誰も行き詰まりません。

プレビュー
{{define "title"}}{{template "signin-title" (dict "State" .Signin "Brand" .Brand)}}{{end}}
{{define "content"}}{{template "signin" (dict "State" .Signin "Brand" .Brand)}}{{end}}

Google、Apple など

ボタンは各社の規定どおりに描いたものをお渡しします。サインインそのものは含みません。使うプロバイダーへの接続はご自身で行ってください。

プレビュー
<section rst-box>
  <h1>サインイン</h1>
  <div rst-signin-providers>
    <form method="post" action="/auth/google">
      <button rst-btn="block" type="submit">
        <svg aria-hidden="true" focusable="false" width="1.1em" height="1.1em" viewBox="0 0 48 48"><path fill="#EA4335" d="M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"/><path fill="#4285F4" d="M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"/><path fill="#FBBC05" d="M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"/><path fill="#34A853" d="M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"/></svg>
        Google で続ける
      </button>
    </form>
    <form method="post" action="/auth/apple">
      <button rst-btn="block" type="submit">
        <svg aria-hidden="true" focusable="false" width="1.1em" height="1.1em" viewBox="0 0 24 24"><path fill="currentColor" d="M12.15 6.9c-.95 0-2.42-1.08-3.96-1.04-2.04.03-3.91 1.18-4.96 3.01-2.12 3.68-.55 9.1 1.52 12.09 1.01 1.45 2.2 3.09 3.79 3.04 1.52-.07 2.09-.99 3.94-.99 1.83 0 2.35.99 3.96.95 1.64-.03 2.68-1.48 3.68-2.95 1.15-1.69 1.63-3.33 1.66-3.42-.04-.01-3.18-1.22-3.22-4.86-.03-3.04 2.48-4.49 2.6-4.56-1.43-2.09-3.63-2.32-4.39-2.38-2-.15-3.68 1.09-4.62 1.09zm3.38-3.07c.84-1.01 1.4-2.43 1.25-3.83-1.21.05-2.66.8-3.53 1.82-.78.9-1.46 2.34-1.27 3.71 1.34.1 2.71-.69 3.55-1.7z"/></svg>
        Apple で続ける
      </button>
    </form>
    <a href="/signin">代わりにメールアドレスを使う</a>
  </div>
</section>

メールアドレスとパスワード

それでもパスワードを使うなら、入り口をひとつにする同じ配置のままにして、再設定への導線をボタンのすぐ下に置いてください。隠さないことです。

パスワードはおすすめしません

rastrillo はこの画面を備えていません。パスワードは使い回され、漏れ、そして安全に保管する仕事はあなたに回ってきます。メールのリンクとパスキーの組み合わせか、パスキーだけを使ってください。マークアップがここにあるのは、まだ必要とする製品があるからです。

プレビュー
<section rst-box>
  <h1>サインイン</h1>
  <form rst-form method="post" action="/signin">
    <div rst-field>
      <label rst-field-label for="pw-email">メールアドレス</label>
      <input rst-input id="pw-email" name="email" type="email" autocomplete="email" required>
    </div>
    <div rst-field>
      <label rst-field-label for="pw-pass">パスワード</label>
      <input rst-input id="pw-pass" name="password" type="password" autocomplete="current-password" required>
    </div>
    <button rst-btn="primary" type="submit">続ける</button>
  </form>
</section>