ナビゲーション

v2.1.0
データ表示

スケジュール

予定を時間軸上に配置します。日や週は時刻を縦軸に、月は週ごとのレーンで、またはアジェンダとして表示します。

このページの内容

スケジュールは、1 日の時刻を縦軸に並べ、各予定の所要時間を高さで表します。カレンダーの日表示、会議の会場別プログラム、クリニックの予約表などに使えます。予定は順序付きリストで、各項目にタイトルと時刻をテキストで記述します。スタイルシートが予定を時間軸上に配置し、1 時間ごとに極細線と時刻ラベルを表示します。重なる予定は横に並びます。スクリプトや寸法の計測は不要です。

終日続く予定は、時間帯の上の帯に表示します。月表示では各日の予定をレーンに並べ、アジェンダでは日ごとに一覧表示します。スケジュールビューは、読み手が操作するスケジュールで、日、週、月、アジェンダで表示でき、schedule ビヘイビアで動作します。

スケジュール

<div class="card max-w(480) mx-auto">  <div class="schedule schedule-now" style="--schedule-from: 9; --schedule-to: 15; --now: 12.45">    <ol class="schedule-rail" aria-hidden="true">      <li>9 AM</li>      <li>10 AM</li>      <li>11 AM</li>      <li>12 PM</li>      <li>1 PM</li>      <li>2 PM</li>      <li>3 PM</li>    </ol>    <ol class="schedule-events" aria-label="Thursday 13 November">      <li class="schedule-event" style="--start: 9; --end: 9.5">        <p class="schedule-title">Standup</p>        <p class="schedule-time">          <time datetime="09:00">9:00</time> – <time datetime="09:30">9:30</time>        </p>      </li>      <li class="schedule-event" style="--start: 10; --end: 11.5; --lanes: 2">        <p class="schedule-title">Design review</p>        <p class="schedule-time">          <time datetime="10:00">10:00</time> – <time datetime="11:30">11:30</time>        </p>      </li>      <li class="schedule-event" style="--start: 10.5; --end: 12; --lane: 1; --lanes: 2">        <p class="schedule-title">Interview: platform engineer</p>        <p class="schedule-time">          <time datetime="10:30">10:30</time> – <time datetime="12:00">12:00</time>        </p>      </li>      <li class="schedule-event" style="--start: 12; --end: 12.25">        <p class="schedule-title">Check-in with Alan</p>        <p class="schedule-time">          <time datetime="12:00">12:00</time> – <time datetime="12:15">12:15</time>        </p>      </li>      <li class="schedule-event" style="--start: 12.75; --end: 13.75">        <p class="schedule-title">Lunch with Ada</p>        <p class="schedule-time">          <time datetime="12:45">12:45</time> – <time datetime="13:45">13:45</time>        </p>      </li>      <li class="schedule-event" style="--start: 14; --end: 14.5">        <p class="schedule-title">1:1 with Grace</p>        <p class="schedule-time">          <time datetime="14:00">14:00</time> – <time datetime="14:30">14:30</time>        </p>      </li>    </ol>  </div></div>
<div className="card max-w(480) mx-auto">  <div className="schedule schedule-now" style={{ '--schedule-from': '9', '--schedule-to': '15', '--now': '12.45' } as React.CSSProperties}>    <ol className="schedule-rail" aria-hidden="true">      <li>9 AM</li>      <li>10 AM</li>      <li>11 AM</li>      <li>12 PM</li>      <li>1 PM</li>      <li>2 PM</li>      <li>3 PM</li>    </ol>    <ol className="schedule-events" aria-label="Thursday 13 November">      <li className="schedule-event" style={{ '--start': '9', '--end': '9.5' } as React.CSSProperties}>        <p className="schedule-title">Standup</p>        <p className="schedule-time">          <time dateTime="09:00">9:00</time> – <time dateTime="09:30">9:30</time>        </p>      </li>      <li className="schedule-event" style={{ '--start': '10', '--end': '11.5', '--lanes': '2' } as React.CSSProperties}>        <p className="schedule-title">Design review</p>        <p className="schedule-time">          <time dateTime="10:00">10:00</time> – <time dateTime="11:30">11:30</time>        </p>      </li>      <li className="schedule-event" style={{ '--start': '10.5', '--end': '12', '--lane': '1', '--lanes': '2' } as React.CSSProperties}>        <p className="schedule-title">Interview: platform engineer</p>        <p className="schedule-time">          <time dateTime="10:30">10:30</time> – <time dateTime="12:00">12:00</time>        </p>      </li>      <li className="schedule-event" style={{ '--start': '12', '--end': '12.25' } as React.CSSProperties}>        <p className="schedule-title">Check-in with Alan</p>        <p className="schedule-time">          <time dateTime="12:00">12:00</time> – <time dateTime="12:15">12:15</time>        </p>      </li>      <li className="schedule-event" style={{ '--start': '12.75', '--end': '13.75' } as React.CSSProperties}>        <p className="schedule-title">Lunch with Ada</p>        <p className="schedule-time">          <time dateTime="12:45">12:45</time> – <time dateTime="13:45">13:45</time>        </p>      </li>      <li className="schedule-event" style={{ '--start': '14', '--end': '14.5' } as React.CSSProperties}>        <p className="schedule-title">1:1 with Grace</p>        <p className="schedule-time">          <time dateTime="14:00">14:00</time> – <time dateTime="14:30">14:30</time>        </p>      </li>    </ol>  </div></div>
<div class="card max-w(480) mx-auto">  <div class="schedule schedule-now" style="--schedule-from: 9; --schedule-to: 15; --now: 12.45">    <ol class="schedule-rail" aria-hidden="true">      <li>9 AM</li>      <li>10 AM</li>      <li>11 AM</li>      <li>12 PM</li>      <li>1 PM</li>      <li>2 PM</li>      <li>3 PM</li>    </ol>    <ol class="schedule-events" aria-label="Thursday 13 November">      <li class="schedule-event" style="--start: 9; --end: 9.5">        <p class="schedule-title">Standup</p>        <p class="schedule-time">          <time datetime="09:00">9:00</time> – <time datetime="09:30">9:30</time>        </p>      </li>      <li class="schedule-event" style="--start: 10; --end: 11.5; --lanes: 2">        <p class="schedule-title">Design review</p>        <p class="schedule-time">          <time datetime="10:00">10:00</time> – <time datetime="11:30">11:30</time>        </p>      </li>      <li class="schedule-event" style="--start: 10.5; --end: 12; --lane: 1; --lanes: 2">        <p class="schedule-title">Interview: platform engineer</p>        <p class="schedule-time">          <time datetime="10:30">10:30</time> – <time datetime="12:00">12:00</time>        </p>      </li>      <li class="schedule-event" style="--start: 12; --end: 12.25">        <p class="schedule-title">Check-in with Alan</p>        <p class="schedule-time">          <time datetime="12:00">12:00</time> – <time datetime="12:15">12:15</time>        </p>      </li>      <li class="schedule-event" style="--start: 12.75; --end: 13.75">        <p class="schedule-title">Lunch with Ada</p>        <p class="schedule-time">          <time datetime="12:45">12:45</time> – <time datetime="13:45">13:45</time>        </p>      </li>      <li class="schedule-event" style="--start: 14; --end: 14.5">        <p class="schedule-title">1:1 with Grace</p>        <p class="schedule-time">          <time datetime="14:00">14:00</time> – <time datetime="14:30">14:30</time>        </p>      </li>    </ol>  </div></div>
<template>  <div class="card max-w(480) mx-auto">    <div class="schedule schedule-now" style="--schedule-from: 9; --schedule-to: 15; --now: 12.45">      <ol class="schedule-rail" aria-hidden="true">        <li>9 AM</li>        <li>10 AM</li>        <li>11 AM</li>        <li>12 PM</li>        <li>1 PM</li>        <li>2 PM</li>        <li>3 PM</li>      </ol>      <ol class="schedule-events" aria-label="Thursday 13 November">        <li class="schedule-event" style="--start: 9; --end: 9.5">          <p class="schedule-title">Standup</p>          <p class="schedule-time">            <time datetime="09:00">9:00</time> – <time datetime="09:30">9:30</time>          </p>        </li>        <li class="schedule-event" style="--start: 10; --end: 11.5; --lanes: 2">          <p class="schedule-title">Design review</p>          <p class="schedule-time">            <time datetime="10:00">10:00</time> – <time datetime="11:30">11:30</time>          </p>        </li>        <li class="schedule-event" style="--start: 10.5; --end: 12; --lane: 1; --lanes: 2">          <p class="schedule-title">Interview: platform engineer</p>          <p class="schedule-time">            <time datetime="10:30">10:30</time> – <time datetime="12:00">12:00</time>          </p>        </li>        <li class="schedule-event" style="--start: 12; --end: 12.25">          <p class="schedule-title">Check-in with Alan</p>          <p class="schedule-time">            <time datetime="12:00">12:00</time> – <time datetime="12:15">12:15</time>          </p>        </li>        <li class="schedule-event" style="--start: 12.75; --end: 13.75">          <p class="schedule-title">Lunch with Ada</p>          <p class="schedule-time">            <time datetime="12:45">12:45</time> – <time datetime="13:45">13:45</time>          </p>        </li>        <li class="schedule-event" style="--start: 14; --end: 14.5">          <p class="schedule-title">1:1 with Grace</p>          <p class="schedule-time">            <time datetime="14:00">14:00</time> – <time datetime="14:30">14:30</time>          </p>        </li>      </ol>    </div>  </div></template>

#予定の配置

時間軸の開始時刻--schedule-fromと終了時刻--schedule-toはscheduleに設定します。1 時間分の高さは--schedule-hourで、指定がなければ 48px です。各schedule-eventには--startと--endを時間軸と同じ時刻の数値で指定します。たとえば 10 時 30 分は 10.5、午後 1 時 45 分は 13.75 です。予定はその時刻に合わせて配置され、上下の極細線から 1px ずつ離れるため、時刻が連続する予定の間にも線が残ります。

schedule-railには、--schedule-fromから--schedule-toまで、終了時刻も含めて 1 時間ごとのラベルを入れます。各ラベルは、対応する極細線の高さに中央をそろえて配置されます。読者になじみのある時刻表記を使ってください。時刻欄の幅は 48px(--schedule-rail)です。

1 時間あたり 48px で 1 日全体を表示すると、高さは 1,100px を超えます。必要な時間帯に絞るか、スケジュールをスクロール領域に入れてスクロールできるようにします。

#重なる予定

時間が重なる予定は、表示幅を分け合います。それぞれに、横に並ぶ予定の数を表す--lanesと、先頭を 0 とした並び位置を表す--laneを指定します。上の例では、デザインレビューと面接が同じ時間帯に 2 列で並んでいます。どの列に割り当てるかはデータに基づいてリストの描画側が決め、スタイルシートは指定された位置に配置します。

#短い予定

各予定はサイズコンテナーで、高さに応じてテキストの表示が変わります。

  • 既定の高さ設定では、1 時間以上の予定はタイトルの下に時刻を表示します。
  • それより短い予定では、タイトルと時刻を 1 行に並べ、予定の中央に配置します。両方が収まらない場合は時刻を非表示にします。
  • 既定の高さで 15 分の予定を表示する場合など、1 行分の高さもないときは、淡い色の面だけを表示します。テキストは支援技術が参照できるようリスト内に残り、時刻は時間軸上の位置で分かります。

#現在時刻と現在の予定

スケジュールにschedule-nowを付けると、予定と同じ時間単位で指定した--nowの位置にインク色の線が引かれ、その日の列の先頭に点が付きます。線は予定の背面を通るため、テキストに重なりません。

aria-current="true"を付けた予定は、インク色の面で表示されます。進行中の予定や、スケジュールの横に詳細を開いている予定に使います。

#複数日の表示

数日分を横に並べるには、各日のschedule-eventsをschedule-dayの中に置き、その上にschedule-headingを配置します。各日は横幅と時間軸を共有し、見出しと時刻の位置がそろいます。今日の列にaria-current="date"を付けると、見出しが強いインク色になり、現在時刻の線は今日の列では点付きで、ほかの日の列では極細線で表示されます。

複数日の表示

<div class="card max-w(560) mx-auto">  <div class="schedule schedule-now" style="--schedule-from: 9; --schedule-to: 13; --now: 11.25">    <ol class="schedule-rail" aria-hidden="true">      <li>9 AM</li>      <li>10 AM</li>      <li>11 AM</li>      <li>12 PM</li>      <li>1 PM</li>    </ol>    <section class="schedule-day" aria-labelledby="day-12">      <h3 class="schedule-heading" id="day-12">Wed 12</h3>      <ol class="schedule-events">        <li class="schedule-event" style="--start: 9; --end: 10">          <p class="schedule-title">Roadmap</p>          <p class="schedule-time">            <time datetime="09:00">9:00</time> – <time datetime="10:00">10:00</time>          </p>        </li>        <li class="schedule-event" style="--start: 11; --end: 12.5">          <p class="schedule-title">Workshop</p>          <p class="schedule-time">            <time datetime="11:00">11:00</time> – <time datetime="12:30">12:30</time>          </p>        </li>      </ol>    </section>    <section class="schedule-day" aria-current="date" aria-labelledby="day-13">      <h3 class="schedule-heading" id="day-13">Thu 13</h3>      <ol class="schedule-events">        <li class="schedule-event" style="--start: 9; --end: 9.5">          <p class="schedule-title">Standup</p>          <p class="schedule-time">            <time datetime="09:00">9:00</time> – <time datetime="09:30">9:30</time>          </p>        </li>        <li class="schedule-event" style="--start: 10; --end: 11.5; --lanes: 2">          <p class="schedule-title">Design review</p>          <p class="schedule-time">            <time datetime="10:00">10:00</time> – <time datetime="11:30">11:30</time>          </p>        </li>        <li class="schedule-event" aria-current="true" style="--start: 10.5; --end: 12; --lane: 1; --lanes: 2">          <p class="schedule-title">Interview</p>          <p class="schedule-time">            <time datetime="10:30">10:30</time> – <time datetime="12:00">12:00</time>          </p>        </li>        <li class="schedule-event" style="--start: 12.25; --end: 13">          <p class="schedule-title">Lunch</p>          <p class="schedule-time">            <time datetime="12:15">12:15</time> – <time datetime="13:00">13:00</time>          </p>        </li>      </ol>    </section>    <section class="schedule-day" aria-labelledby="day-14">      <h3 class="schedule-heading" id="day-14">Fri 14</h3>      <ol class="schedule-events">        <li class="schedule-event" style="--start: 9.5; --end: 10.25">          <p class="schedule-title">Sync</p>          <p class="schedule-time">            <time datetime="09:30">9:30</time> – <time datetime="10:15">10:15</time>          </p>        </li>        <li class="schedule-event" style="--start: 11.5; --end: 13">          <p class="schedule-title">Offsite</p>          <p class="schedule-time">            <time datetime="11:30">11:30</time> – <time datetime="13:00">13:00</time>          </p>        </li>      </ol>    </section>  </div></div>
<div className="card max-w(560) mx-auto">  <div className="schedule schedule-now" style={{ '--schedule-from': '9', '--schedule-to': '13', '--now': '11.25' } as React.CSSProperties}>    <ol className="schedule-rail" aria-hidden="true">      <li>9 AM</li>      <li>10 AM</li>      <li>11 AM</li>      <li>12 PM</li>      <li>1 PM</li>    </ol>    <section className="schedule-day" aria-labelledby="day-12">      <h3 className="schedule-heading" id="day-12">Wed 12</h3>      <ol className="schedule-events">        <li className="schedule-event" style={{ '--start': '9', '--end': '10' } as React.CSSProperties}>          <p className="schedule-title">Roadmap</p>          <p className="schedule-time">            <time dateTime="09:00">9:00</time> – <time dateTime="10:00">10:00</time>          </p>        </li>        <li className="schedule-event" style={{ '--start': '11', '--end': '12.5' } as React.CSSProperties}>          <p className="schedule-title">Workshop</p>          <p className="schedule-time">            <time dateTime="11:00">11:00</time> – <time dateTime="12:30">12:30</time>          </p>        </li>      </ol>    </section>    <section className="schedule-day" aria-current="date" aria-labelledby="day-13">      <h3 className="schedule-heading" id="day-13">Thu 13</h3>      <ol className="schedule-events">        <li className="schedule-event" style={{ '--start': '9', '--end': '9.5' } as React.CSSProperties}>          <p className="schedule-title">Standup</p>          <p className="schedule-time">            <time dateTime="09:00">9:00</time> – <time dateTime="09:30">9:30</time>          </p>        </li>        <li className="schedule-event" style={{ '--start': '10', '--end': '11.5', '--lanes': '2' } as React.CSSProperties}>          <p className="schedule-title">Design review</p>          <p className="schedule-time">            <time dateTime="10:00">10:00</time> – <time dateTime="11:30">11:30</time>          </p>        </li>        <li className="schedule-event" aria-current="true" style={{ '--start': '10.5', '--end': '12', '--lane': '1', '--lanes': '2' } as React.CSSProperties}>          <p className="schedule-title">Interview</p>          <p className="schedule-time">            <time dateTime="10:30">10:30</time> – <time dateTime="12:00">12:00</time>          </p>        </li>        <li className="schedule-event" style={{ '--start': '12.25', '--end': '13' } as React.CSSProperties}>          <p className="schedule-title">Lunch</p>          <p className="schedule-time">            <time dateTime="12:15">12:15</time> – <time dateTime="13:00">13:00</time>          </p>        </li>      </ol>    </section>    <section className="schedule-day" aria-labelledby="day-14">      <h3 className="schedule-heading" id="day-14">Fri 14</h3>      <ol className="schedule-events">        <li className="schedule-event" style={{ '--start': '9.5', '--end': '10.25' } as React.CSSProperties}>          <p className="schedule-title">Sync</p>          <p className="schedule-time">            <time dateTime="09:30">9:30</time> – <time dateTime="10:15">10:15</time>          </p>        </li>        <li className="schedule-event" style={{ '--start': '11.5', '--end': '13' } as React.CSSProperties}>          <p className="schedule-title">Offsite</p>          <p className="schedule-time">            <time dateTime="11:30">11:30</time> – <time dateTime="13:00">13:00</time>          </p>        </li>      </ol>    </section>  </div></div>
<div class="card max-w(560) mx-auto">  <div class="schedule schedule-now" style="--schedule-from: 9; --schedule-to: 13; --now: 11.25">    <ol class="schedule-rail" aria-hidden="true">      <li>9 AM</li>      <li>10 AM</li>      <li>11 AM</li>      <li>12 PM</li>      <li>1 PM</li>    </ol>    <section class="schedule-day" aria-labelledby="day-12">      <h3 class="schedule-heading" id="day-12">Wed 12</h3>      <ol class="schedule-events">        <li class="schedule-event" style="--start: 9; --end: 10">          <p class="schedule-title">Roadmap</p>          <p class="schedule-time">            <time datetime="09:00">9:00</time> – <time datetime="10:00">10:00</time>          </p>        </li>        <li class="schedule-event" style="--start: 11; --end: 12.5">          <p class="schedule-title">Workshop</p>          <p class="schedule-time">            <time datetime="11:00">11:00</time> – <time datetime="12:30">12:30</time>          </p>        </li>      </ol>    </section>    <section class="schedule-day" aria-current="date" aria-labelledby="day-13">      <h3 class="schedule-heading" id="day-13">Thu 13</h3>      <ol class="schedule-events">        <li class="schedule-event" style="--start: 9; --end: 9.5">          <p class="schedule-title">Standup</p>          <p class="schedule-time">            <time datetime="09:00">9:00</time> – <time datetime="09:30">9:30</time>          </p>        </li>        <li class="schedule-event" style="--start: 10; --end: 11.5; --lanes: 2">          <p class="schedule-title">Design review</p>          <p class="schedule-time">            <time datetime="10:00">10:00</time> – <time datetime="11:30">11:30</time>          </p>        </li>        <li class="schedule-event" aria-current="true" style="--start: 10.5; --end: 12; --lane: 1; --lanes: 2">          <p class="schedule-title">Interview</p>          <p class="schedule-time">            <time datetime="10:30">10:30</time> – <time datetime="12:00">12:00</time>          </p>        </li>        <li class="schedule-event" style="--start: 12.25; --end: 13">          <p class="schedule-title">Lunch</p>          <p class="schedule-time">            <time datetime="12:15">12:15</time> – <time datetime="13:00">13:00</time>          </p>        </li>      </ol>    </section>    <section class="schedule-day" aria-labelledby="day-14">      <h3 class="schedule-heading" id="day-14">Fri 14</h3>      <ol class="schedule-events">        <li class="schedule-event" style="--start: 9.5; --end: 10.25">          <p class="schedule-title">Sync</p>          <p class="schedule-time">            <time datetime="09:30">9:30</time> – <time datetime="10:15">10:15</time>          </p>        </li>        <li class="schedule-event" style="--start: 11.5; --end: 13">          <p class="schedule-title">Offsite</p>          <p class="schedule-time">            <time datetime="11:30">11:30</time> – <time datetime="13:00">13:00</time>          </p>        </li>      </ol>    </section>  </div></div>
<template>  <div class="card max-w(560) mx-auto">    <div class="schedule schedule-now" style="--schedule-from: 9; --schedule-to: 13; --now: 11.25">      <ol class="schedule-rail" aria-hidden="true">        <li>9 AM</li>        <li>10 AM</li>        <li>11 AM</li>        <li>12 PM</li>        <li>1 PM</li>      </ol>      <section class="schedule-day" aria-labelledby="day-12">        <h3 class="schedule-heading" id="day-12">Wed 12</h3>        <ol class="schedule-events">          <li class="schedule-event" style="--start: 9; --end: 10">            <p class="schedule-title">Roadmap</p>            <p class="schedule-time">              <time datetime="09:00">9:00</time> – <time datetime="10:00">10:00</time>            </p>          </li>          <li class="schedule-event" style="--start: 11; --end: 12.5">            <p class="schedule-title">Workshop</p>            <p class="schedule-time">              <time datetime="11:00">11:00</time> – <time datetime="12:30">12:30</time>            </p>          </li>        </ol>      </section>      <section class="schedule-day" aria-current="date" aria-labelledby="day-13">        <h3 class="schedule-heading" id="day-13">Thu 13</h3>        <ol class="schedule-events">          <li class="schedule-event" style="--start: 9; --end: 9.5">            <p class="schedule-title">Standup</p>            <p class="schedule-time">              <time datetime="09:00">9:00</time> – <time datetime="09:30">9:30</time>            </p>          </li>          <li class="schedule-event" style="--start: 10; --end: 11.5; --lanes: 2">            <p class="schedule-title">Design review</p>            <p class="schedule-time">              <time datetime="10:00">10:00</time> – <time datetime="11:30">11:30</time>            </p>          </li>          <li class="schedule-event" aria-current="true" style="--start: 10.5; --end: 12; --lane: 1; --lanes: 2">            <p class="schedule-title">Interview</p>            <p class="schedule-time">              <time datetime="10:30">10:30</time> – <time datetime="12:00">12:00</time>            </p>          </li>          <li class="schedule-event" style="--start: 12.25; --end: 13">            <p class="schedule-title">Lunch</p>            <p class="schedule-time">              <time datetime="12:15">12:15</time> – <time datetime="13:00">13:00</time>            </p>          </li>        </ol>      </section>      <section class="schedule-day" aria-labelledby="day-14">        <h3 class="schedule-heading" id="day-14">Fri 14</h3>        <ol class="schedule-events">          <li class="schedule-event" style="--start: 9.5; --end: 10.25">            <p class="schedule-title">Sync</p>            <p class="schedule-time">              <time datetime="09:30">9:30</time> – <time datetime="10:15">10:15</time>            </p>          </li>          <li class="schedule-event" style="--start: 11.5; --end: 13">            <p class="schedule-title">Offsite</p>            <p class="schedule-time">              <time datetime="11:30">11:30</time> – <time datetime="13:00">13:00</time>            </p>          </li>        </ol>      </section>    </div>  </div></template>

3〜5日分ならカード内でも読みやすく、1週間分にはページ幅が適しています。狭いカラムでも各日の表示幅は均等に保たれ、収まりきらないタイトルの末尾は省略記号で表示されます。

#詳細を開く予定

予定の詳細を開けるようにする場合は、リスト項目自体ではなく、その中のリンクまたはボタンにschedule-eventを指定します。配置は同じで、ポインターを重ねると色が一段濃くなり、キーボードでフォーカスするとフォーカスリングが表示されます。

<li>  <a class="schedule-event" href="/events/design-review" style="--start: 10; --end: 11.5">    <span class="schedule-title">Design review</span>    <span class="schedule-time"><time datetime="10:00">10:00</time> – <time datetime="11:30">11:30</time></span>  </a></li>

#終日の予定

1 日以上続く予定は、見出しの下、時間帯の上にある帯 schedule-allday に置き、時刻欄の列に「All day」(終日)などの帯の名前を表示します。帯の中の各予定は schedule-event-lane で、--column 日目から --span 日分を、--lane 番目のレーンに表示します。帯は複数の日にまたがるため、各 schedule-day は --column で自分の列を示し、スケジュールは列の数を --schedule-days で示します。

終日の予定

<div class="card max-w(560) mx-auto">  <div class="card-body">    <div class="schedule" style="--schedule-from: 9; --schedule-to: 13; --schedule-days: 3">      <ol class="schedule-rail" aria-hidden="true">        <li>9 AM</li>        <li>10 AM</li>        <li>11 AM</li>        <li>12 PM</li>        <li>1 PM</li>      </ol>      <div class="schedule-day" style="--column: 1">        <h3 class="schedule-heading">Wed 12</h3>        <ol class="schedule-events" aria-label="Wednesday 12 November">          <li class="schedule-event" style="--start: 9.5; --end: 10.5">            <p class="schedule-title">Planning</p>            <p class="schedule-time">9:30 – 10:30</p>          </li>        </ol>      </div>      <div class="schedule-day" style="--column: 2" aria-current="date">        <h3 class="schedule-heading">Thu 13</h3>        <ol class="schedule-events" aria-label="Thursday 13 November">          <li class="schedule-event" style="--start: 11; --end: 12">            <p class="schedule-title">Design review</p>            <p class="schedule-time">11:00 – 12:00</p>          </li>        </ol>      </div>      <div class="schedule-day" style="--column: 3">        <h3 class="schedule-heading">Fri 14</h3>        <ol class="schedule-events" aria-label="Friday 14 November"></ol>      </div>      <div class="schedule-allday" role="group" aria-label="All day">        <span class="schedule-allday-label" aria-hidden="true">All day</span>        <p class="schedule-event schedule-event-lane" style="--column: 2; --span: 2">          <span class="schedule-title">Offsite in Lisbon</span>        </p>        <p class="schedule-event schedule-event-lane schedule-event-continued" style="--column: 1; --lane: 1">          <span class="schedule-title">On call</span>        </p>      </div>    </div>  </div></div>
<div className="card max-w(560) mx-auto">  <div className="card-body">    <div className="schedule" style={{ '--schedule-from': '9', '--schedule-to': '13', '--schedule-days': '3' } as React.CSSProperties}>      <ol className="schedule-rail" aria-hidden="true">        <li>9 AM</li>        <li>10 AM</li>        <li>11 AM</li>        <li>12 PM</li>        <li>1 PM</li>      </ol>      <div className="schedule-day" style={{ '--column': '1' } as React.CSSProperties}>        <h3 className="schedule-heading">Wed 12</h3>        <ol className="schedule-events" aria-label="Wednesday 12 November">          <li className="schedule-event" style={{ '--start': '9.5', '--end': '10.5' } as React.CSSProperties}>            <p className="schedule-title">Planning</p>            <p className="schedule-time">9:30 – 10:30</p>          </li>        </ol>      </div>      <div className="schedule-day" style={{ '--column': '2' } as React.CSSProperties} aria-current="date">        <h3 className="schedule-heading">Thu 13</h3>        <ol className="schedule-events" aria-label="Thursday 13 November">          <li className="schedule-event" style={{ '--start': '11', '--end': '12' } as React.CSSProperties}>            <p className="schedule-title">Design review</p>            <p className="schedule-time">11:00 – 12:00</p>          </li>        </ol>      </div>      <div className="schedule-day" style={{ '--column': '3' } as React.CSSProperties}>        <h3 className="schedule-heading">Fri 14</h3>        <ol className="schedule-events" aria-label="Friday 14 November"></ol>      </div>      <div className="schedule-allday" role="group" aria-label="All day">        <span className="schedule-allday-label" aria-hidden="true">All day</span>        <p className="schedule-event schedule-event-lane" style={{ '--column': '2', '--span': '2' } as React.CSSProperties}>          <span className="schedule-title">Offsite in Lisbon</span>        </p>        <p className="schedule-event schedule-event-lane schedule-event-continued" style={{ '--column': '1', '--lane': '1' } as React.CSSProperties}>          <span className="schedule-title">On call</span>        </p>      </div>    </div>  </div></div>
<div class="card max-w(560) mx-auto">  <div class="card-body">    <div class="schedule" style="--schedule-from: 9; --schedule-to: 13; --schedule-days: 3">      <ol class="schedule-rail" aria-hidden="true">        <li>9 AM</li>        <li>10 AM</li>        <li>11 AM</li>        <li>12 PM</li>        <li>1 PM</li>      </ol>      <div class="schedule-day" style="--column: 1">        <h3 class="schedule-heading">Wed 12</h3>        <ol class="schedule-events" aria-label="Wednesday 12 November">          <li class="schedule-event" style="--start: 9.5; --end: 10.5">            <p class="schedule-title">Planning</p>            <p class="schedule-time">9:30 – 10:30</p>          </li>        </ol>      </div>      <div class="schedule-day" style="--column: 2" aria-current="date">        <h3 class="schedule-heading">Thu 13</h3>        <ol class="schedule-events" aria-label="Thursday 13 November">          <li class="schedule-event" style="--start: 11; --end: 12">            <p class="schedule-title">Design review</p>            <p class="schedule-time">11:00 – 12:00</p>          </li>        </ol>      </div>      <div class="schedule-day" style="--column: 3">        <h3 class="schedule-heading">Fri 14</h3>        <ol class="schedule-events" aria-label="Friday 14 November"></ol>      </div>      <div class="schedule-allday" role="group" aria-label="All day">        <span class="schedule-allday-label" aria-hidden="true">All day</span>        <p class="schedule-event schedule-event-lane" style="--column: 2; --span: 2">          <span class="schedule-title">Offsite in Lisbon</span>        </p>        <p class="schedule-event schedule-event-lane schedule-event-continued" style="--column: 1; --lane: 1">          <span class="schedule-title">On call</span>        </p>      </div>    </div>  </div></div>
<template>  <div class="card max-w(560) mx-auto">    <div class="card-body">      <div class="schedule" style="--schedule-from: 9; --schedule-to: 13; --schedule-days: 3">        <ol class="schedule-rail" aria-hidden="true">          <li>9 AM</li>          <li>10 AM</li>          <li>11 AM</li>          <li>12 PM</li>          <li>1 PM</li>        </ol>        <div class="schedule-day" style="--column: 1">          <h3 class="schedule-heading">Wed 12</h3>          <ol class="schedule-events" aria-label="Wednesday 12 November">            <li class="schedule-event" style="--start: 9.5; --end: 10.5">              <p class="schedule-title">Planning</p>              <p class="schedule-time">9:30 – 10:30</p>            </li>          </ol>        </div>        <div class="schedule-day" style="--column: 2" aria-current="date">          <h3 class="schedule-heading">Thu 13</h3>          <ol class="schedule-events" aria-label="Thursday 13 November">            <li class="schedule-event" style="--start: 11; --end: 12">              <p class="schedule-title">Design review</p>              <p class="schedule-time">11:00 – 12:00</p>            </li>          </ol>        </div>        <div class="schedule-day" style="--column: 3">          <h3 class="schedule-heading">Fri 14</h3>          <ol class="schedule-events" aria-label="Friday 14 November"></ol>        </div>        <div class="schedule-allday" role="group" aria-label="All day">          <span class="schedule-allday-label" aria-hidden="true">All day</span>          <p class="schedule-event schedule-event-lane" style="--column: 2; --span: 2">            <span class="schedule-title">Offsite in Lisbon</span>          </p>          <p class="schedule-event schedule-event-lane schedule-event-continued" style="--column: 1; --lane: 1">            <span class="schedule-title">On call</span>          </p>        </div>      </div>    </div>  </div></template>

表示範囲より前に始まった予定の一部には schedule-event-continued を、表示範囲より後まで続く予定の一部には schedule-event-continues を付けます。レーンでは開始側または終了側の端が角張って縁まで伸び、時間帯の表示で日付をまたぐ場合は上端または下端が同様になります。予定の開始部分ではない部分には、バーは表示されません。

#カテゴリー

schedule-event-category は、予定自身またはその祖先に設定されたカテゴリーで予定を色分けします。予定のシートにはカテゴリーの面の色、バーにはマークの色、文字にはテキストの色が使われます。複数のチームやプロジェクトのカレンダーでは、この方法で予定を見分けられます。その場合も、予定の内容はタイトルで伝えます。

カテゴリー

<div class="card max-w(480) mx-auto">  <div class="card-body">    <div class="schedule" style="--schedule-from: 9; --schedule-to: 12">      <ol class="schedule-rail" aria-hidden="true">        <li>9 AM</li>        <li>10 AM</li>        <li>11 AM</li>        <li>12 PM</li>      </ol>      <ol class="schedule-events" aria-label="Thursday 13 November">        <li class="schedule-event schedule-event-category category-violet" style="--start: 9; --end: 10; --lanes: 2">          <p class="schedule-title">User interviews</p>          <p class="schedule-time">9:00 – 10:00</p>        </li>        <li class="schedule-event schedule-event-category category-teal" style="--start: 9.5; --end: 11; --lane: 1; --lanes: 2">          <p class="schedule-title">Token audit</p>          <p class="schedule-time">9:30 – 11:00</p>        </li>        <li class="schedule-event schedule-event-category category-orange" style="--start: 11; --end: 11.75">          <p class="schedule-title">Launch check-in</p>          <p class="schedule-time">11:00 – 11:45</p>        </li>      </ol>    </div>  </div></div>
<div className="card max-w(480) mx-auto">  <div className="card-body">    <div className="schedule" style={{ '--schedule-from': '9', '--schedule-to': '12' } as React.CSSProperties}>      <ol className="schedule-rail" aria-hidden="true">        <li>9 AM</li>        <li>10 AM</li>        <li>11 AM</li>        <li>12 PM</li>      </ol>      <ol className="schedule-events" aria-label="Thursday 13 November">        <li className="schedule-event schedule-event-category category-violet" style={{ '--start': '9', '--end': '10', '--lanes': '2' } as React.CSSProperties}>          <p className="schedule-title">User interviews</p>          <p className="schedule-time">9:00 – 10:00</p>        </li>        <li className="schedule-event schedule-event-category category-teal" style={{ '--start': '9.5', '--end': '11', '--lane': '1', '--lanes': '2' } as React.CSSProperties}>          <p className="schedule-title">Token audit</p>          <p className="schedule-time">9:30 – 11:00</p>        </li>        <li className="schedule-event schedule-event-category category-orange" style={{ '--start': '11', '--end': '11.75' } as React.CSSProperties}>          <p className="schedule-title">Launch check-in</p>          <p className="schedule-time">11:00 – 11:45</p>        </li>      </ol>    </div>  </div></div>
<div class="card max-w(480) mx-auto">  <div class="card-body">    <div class="schedule" style="--schedule-from: 9; --schedule-to: 12">      <ol class="schedule-rail" aria-hidden="true">        <li>9 AM</li>        <li>10 AM</li>        <li>11 AM</li>        <li>12 PM</li>      </ol>      <ol class="schedule-events" aria-label="Thursday 13 November">        <li class="schedule-event schedule-event-category category-violet" style="--start: 9; --end: 10; --lanes: 2">          <p class="schedule-title">User interviews</p>          <p class="schedule-time">9:00 – 10:00</p>        </li>        <li class="schedule-event schedule-event-category category-teal" style="--start: 9.5; --end: 11; --lane: 1; --lanes: 2">          <p class="schedule-title">Token audit</p>          <p class="schedule-time">9:30 – 11:00</p>        </li>        <li class="schedule-event schedule-event-category category-orange" style="--start: 11; --end: 11.75">          <p class="schedule-title">Launch check-in</p>          <p class="schedule-time">11:00 – 11:45</p>        </li>      </ol>    </div>  </div></div>
<template>  <div class="card max-w(480) mx-auto">    <div class="card-body">      <div class="schedule" style="--schedule-from: 9; --schedule-to: 12">        <ol class="schedule-rail" aria-hidden="true">          <li>9 AM</li>          <li>10 AM</li>          <li>11 AM</li>          <li>12 PM</li>        </ol>        <ol class="schedule-events" aria-label="Thursday 13 November">          <li class="schedule-event schedule-event-category category-violet" style="--start: 9; --end: 10; --lanes: 2">            <p class="schedule-title">User interviews</p>            <p class="schedule-time">9:00 – 10:00</p>          </li>          <li class="schedule-event schedule-event-category category-teal" style="--start: 9.5; --end: 11; --lane: 1; --lanes: 2">            <p class="schedule-title">Token audit</p>            <p class="schedule-time">9:30 – 11:00</p>          </li>          <li class="schedule-event schedule-event-category category-orange" style="--start: 11; --end: 11.75">            <p class="schedule-title">Launch check-in</p>            <p class="schedule-time">11:00 – 11:45</p>          </li>        </ol>      </div>    </div>  </div></template>

#月表示

schedule-month は、1 か月を 7 日ずつの週で表示します。各 schedule-week は、日付、その日に始まる予定、「さらに表示」ボタンの順に書き出すため、スクリーンリーダーは日付の順に読み上げます。スタイルシートがそれぞれを列とレーンに配置します。日付の数字 schedule-date-number は、その日を開く丸いボタンで、今日はインク色で表示されます。1 日に表示する予定は --lanes 件(既定は 3 件)で、残りは schedule-more ボタンにまとめられます。このボタンは、残りの予定を一覧にしたポップオーバーを開きます。月表示の短い予定は、シートのない簡素な表示 schedule-event-plain になり、ドット、時刻、タイトルだけを表示します。

36rem より狭い領域ではレーンを使わず、各日の数字の下に予定ごとのドットを最大 3 つ表示します。数字を押すとその日が開きます。7 つの狭い列にテキストを詰め込むことはしません。

schedule-agenda は、同じ予定を日ごとに一覧表示します。各行の先頭に日付を置き、その横の schedule-list に予定を並べます。狭い領域では予定を日付の下に並べます。スマートフォンや印刷物、図を見るより文章で読みたい読者に適しています。

月表示とアジェンダは予定データから書き出すため、下のビューのように、ビヘイビアかフレームワークのコンポーネントで生成します。

#操作できるスケジュール

schedule-view は、schedule ビヘイビアが書き出す本体の上に、コントロールを並べたヘッダーを置きます。ヘッダーには、今日、前へ、次へ、期間の名前、日・週・月・アジェンダの切り替えがあります。前へと次へはビューの期間単位で移動し、日付の数字を押すとその日が開き、期間の名前は変わったときに読み上げられます。狭い領域では、期間の名前が独立した 1 行に表示されます。

操作できるスケジュール

<section class="schedule-view" id="team" aria-labelledby="team-title">  <div class="schedule-view-header">    <button type="button" class="btn btn-sm schedule-view-today">Today</button>    <button type="button" class="btn btn-sm btn-square btn-quiet schedule-view-previous" aria-label="Previous">      <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="M6 3.5L10.3586 7.8586A0.2 0.2 0 0 1 10.3586 8.1414L6 12.5" transform="rotate(180 8 8)" />      </svg>    </button>    <button type="button" class="btn btn-sm btn-square btn-quiet schedule-view-next" aria-label="Next">      <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="M6 3.5L10.3586 7.8586A0.2 0.2 0 0 1 10.3586 8.1414L6 12.5" />      </svg>    </button>    <h2 class="schedule-view-title" id="team-title" aria-live="polite">November 2026</h2>    <div class="segmented segmented-sm schedule-view-switch" role="radiogroup" aria-label="View">      <label class="segmented-item">        <input type="radio" class="segmented-input" name="team-view" value="day">Day      </label>      <label class="segmented-item">        <input type="radio" class="segmented-input" name="team-view" value="week">Week      </label>      <label class="segmented-item">        <input type="radio" class="segmented-input" name="team-view" value="month" checked>Month      </label>      <label class="segmented-item">        <input type="radio" class="segmented-input" name="team-view" value="agenda">Agenda      </label>    </div>  </div>  <div class="schedule-view-body"></div></section><script>addEventListener('DOMContentLoaded', function () {MasterUI.schedule(document.getElementById('team'), {  today: '2026-11-13', locale: 'en-US', weekStart: 1, value: { date: '2026-11-13', view: 'month' },  events: [    { id: 'review', title: 'Design review', start: '2026-11-03T10:00', end: '2026-11-03T11:30', category: 'violet' },    { id: 'offsite', title: 'Offsite', start: '2026-11-07', end: '2026-11-11', allDay: true, category: 'teal' },    { id: 'deploy', title: 'Deploy window', start: '2026-11-12T22:00', end: '2026-11-13T02:00', category: 'red' },    { id: 'launch', title: 'Launch', start: '2026-11-13', end: '2026-11-14', allDay: true, category: 'orange' },    { id: 'standup', title: 'Standup', start: '2026-11-13T09:00', end: '2026-11-13T09:15' },    { id: 'lunch', title: 'Team lunch', start: '2026-11-13T12:00', end: '2026-11-13T13:00', category: 'green' },    { id: 'call', title: 'Customer call', start: '2026-11-13T14:00', end: '2026-11-13T15:00', category: 'blue' },    { id: 'retro', title: 'Retro', start: '2026-11-13T17:00', end: '2026-11-13T17:45' },    { id: 'planning', title: 'Planning', start: '2026-11-17T09:30', end: '2026-11-17T11:00', category: 'blue' },    { id: 'conference', title: 'Conference', start: '2026-11-19', end: '2026-11-22', allDay: true, category: 'violet' }  ]})})</script><script type="module">  import { attach } from '@master/ui/behaviors'  attach()</script>
import { useEffect, useRef } from 'react'import { attach, schedule } from '@master/ui/behaviors'import ChevronLeftIcon from '@master/icons-react/native/16/soft/chevron-left'import ChevronRightIcon from '@master/icons-react/native/16/soft/chevron-right'export function Example() {  const root = useRef<HTMLElement>(null)  useEffect(() => {    const detach = [      attach(root.current!),      schedule(document.getElementById('team')!, {        today: '2026-11-13', locale: 'en-US', weekStart: 1, value: { date: '2026-11-13', view: 'month' },        events: [          { id: 'review', title: 'Design review', start: '2026-11-03T10:00', end: '2026-11-03T11:30', category: 'violet' },          { id: 'offsite', title: 'Offsite', start: '2026-11-07', end: '2026-11-11', allDay: true, category: 'teal' },          { id: 'deploy', title: 'Deploy window', start: '2026-11-12T22:00', end: '2026-11-13T02:00', category: 'red' },          { id: 'launch', title: 'Launch', start: '2026-11-13', end: '2026-11-14', allDay: true, category: 'orange' },          { id: 'standup', title: 'Standup', start: '2026-11-13T09:00', end: '2026-11-13T09:15' },          { id: 'lunch', title: 'Team lunch', start: '2026-11-13T12:00', end: '2026-11-13T13:00', category: 'green' },          { id: 'call', title: 'Customer call', start: '2026-11-13T14:00', end: '2026-11-13T15:00', category: 'blue' },          { id: 'retro', title: 'Retro', start: '2026-11-13T17:00', end: '2026-11-13T17:45' },          { id: 'planning', title: 'Planning', start: '2026-11-17T09:30', end: '2026-11-17T11:00', category: 'blue' },          { id: 'conference', title: 'Conference', start: '2026-11-19', end: '2026-11-22', allDay: true, category: 'violet' }        ]      }),    ]    return () => detach.forEach(stop => stop())  }, [])  return (    <section ref={root} className="schedule-view" id="team" aria-labelledby="team-title">      <div className="schedule-view-header">        <button type="button" className="btn btn-sm schedule-view-today">Today</button>        <button type="button" className="btn btn-sm btn-square btn-quiet schedule-view-previous" aria-label="Previous">          <ChevronLeftIcon className="icon" />        </button>        <button type="button" className="btn btn-sm btn-square btn-quiet schedule-view-next" aria-label="Next">          <ChevronRightIcon className="icon" />        </button>        <h2 className="schedule-view-title" id="team-title" aria-live="polite">November 2026</h2>        <div className="segmented segmented-sm schedule-view-switch" role="radiogroup" aria-label="View">          <label className="segmented-item">            <input type="radio" className="segmented-input" name="team-view" value="day" />Day          </label>          <label className="segmented-item">            <input type="radio" className="segmented-input" name="team-view" value="week" />Week          </label>          <label className="segmented-item">            <input type="radio" className="segmented-input" name="team-view" value="month" defaultChecked />Month          </label>          <label className="segmented-item">            <input type="radio" className="segmented-input" name="team-view" value="agenda" />Agenda          </label>        </div>      </div>      <div className="schedule-view-body"></div>    </section>  )}
<script>  import { attach, schedule } from '@master/ui/behaviors'  import ChevronLeftIcon from '@master/icons-svelte/native/16/soft/chevron-left'  import ChevronRightIcon from '@master/icons-svelte/native/16/soft/chevron-right'  function mounted(root) {    const detach = [      attach(root),      schedule(document.getElementById('team'), {        today: '2026-11-13', locale: 'en-US', weekStart: 1, value: { date: '2026-11-13', view: 'month' },        events: [          { id: 'review', title: 'Design review', start: '2026-11-03T10:00', end: '2026-11-03T11:30', category: 'violet' },          { id: 'offsite', title: 'Offsite', start: '2026-11-07', end: '2026-11-11', allDay: true, category: 'teal' },          { id: 'deploy', title: 'Deploy window', start: '2026-11-12T22:00', end: '2026-11-13T02:00', category: 'red' },          { id: 'launch', title: 'Launch', start: '2026-11-13', end: '2026-11-14', allDay: true, category: 'orange' },          { id: 'standup', title: 'Standup', start: '2026-11-13T09:00', end: '2026-11-13T09:15' },          { id: 'lunch', title: 'Team lunch', start: '2026-11-13T12:00', end: '2026-11-13T13:00', category: 'green' },          { id: 'call', title: 'Customer call', start: '2026-11-13T14:00', end: '2026-11-13T15:00', category: 'blue' },          { id: 'retro', title: 'Retro', start: '2026-11-13T17:00', end: '2026-11-13T17:45' },          { id: 'planning', title: 'Planning', start: '2026-11-17T09:30', end: '2026-11-17T11:00', category: 'blue' },          { id: 'conference', title: 'Conference', start: '2026-11-19', end: '2026-11-22', allDay: true, category: 'violet' }        ]      }),    ]    return () => detach.forEach(stop => stop())  }</script><section class="schedule-view" id="team" aria-labelledby="team-title" {@attach mounted}>  <div class="schedule-view-header">    <button type="button" class="btn btn-sm schedule-view-today">Today</button>    <button type="button" class="btn btn-sm btn-square btn-quiet schedule-view-previous" aria-label="Previous">      <ChevronLeftIcon class="icon" />    </button>    <button type="button" class="btn btn-sm btn-square btn-quiet schedule-view-next" aria-label="Next">      <ChevronRightIcon class="icon" />    </button>    <h2 class="schedule-view-title" id="team-title" aria-live="polite">November 2026</h2>    <div class="segmented segmented-sm schedule-view-switch" role="radiogroup" aria-label="View">      <label class="segmented-item">        <input type="radio" class="segmented-input" name="team-view" value="day">Day      </label>      <label class="segmented-item">        <input type="radio" class="segmented-input" name="team-view" value="week">Week      </label>      <label class="segmented-item">        <input type="radio" class="segmented-input" name="team-view" value="month" checked>Month      </label>      <label class="segmented-item">        <input type="radio" class="segmented-input" name="team-view" value="agenda">Agenda      </label>    </div>  </div>  <div class="schedule-view-body"></div></section>
<script setup>import { onMounted, onUnmounted, ref } from 'vue'import { attach, schedule } from '@master/ui/behaviors'import ChevronLeftIcon from '@master/icons-vue/native/16/soft/chevron-left'import ChevronRightIcon from '@master/icons-vue/native/16/soft/chevron-right'const root = ref(null)let detach = []onMounted(() => {  detach = [    attach(root.value),    schedule(document.getElementById('team'), {      today: '2026-11-13', locale: 'en-US', weekStart: 1, value: { date: '2026-11-13', view: 'month' },      events: [        { id: 'review', title: 'Design review', start: '2026-11-03T10:00', end: '2026-11-03T11:30', category: 'violet' },        { id: 'offsite', title: 'Offsite', start: '2026-11-07', end: '2026-11-11', allDay: true, category: 'teal' },        { id: 'deploy', title: 'Deploy window', start: '2026-11-12T22:00', end: '2026-11-13T02:00', category: 'red' },        { id: 'launch', title: 'Launch', start: '2026-11-13', end: '2026-11-14', allDay: true, category: 'orange' },        { id: 'standup', title: 'Standup', start: '2026-11-13T09:00', end: '2026-11-13T09:15' },        { id: 'lunch', title: 'Team lunch', start: '2026-11-13T12:00', end: '2026-11-13T13:00', category: 'green' },        { id: 'call', title: 'Customer call', start: '2026-11-13T14:00', end: '2026-11-13T15:00', category: 'blue' },        { id: 'retro', title: 'Retro', start: '2026-11-13T17:00', end: '2026-11-13T17:45' },        { id: 'planning', title: 'Planning', start: '2026-11-17T09:30', end: '2026-11-17T11:00', category: 'blue' },        { id: 'conference', title: 'Conference', start: '2026-11-19', end: '2026-11-22', allDay: true, category: 'violet' }      ]    }),  ]})onUnmounted(() => detach.forEach(stop => stop()))</script><template>  <section ref="root" class="schedule-view" id="team" aria-labelledby="team-title">    <div class="schedule-view-header">      <button type="button" class="btn btn-sm schedule-view-today">Today</button>      <button type="button" class="btn btn-sm btn-square btn-quiet schedule-view-previous" aria-label="Previous">        <ChevronLeftIcon class="icon" />      </button>      <button type="button" class="btn btn-sm btn-square btn-quiet schedule-view-next" aria-label="Next">        <ChevronRightIcon class="icon" />      </button>      <h2 class="schedule-view-title" id="team-title" aria-live="polite">November 2026</h2>      <div class="segmented segmented-sm schedule-view-switch" role="radiogroup" aria-label="View">        <label class="segmented-item">          <input type="radio" class="segmented-input" name="team-view" value="day">Day        </label>        <label class="segmented-item">          <input type="radio" class="segmented-input" name="team-view" value="week">Week        </label>        <label class="segmented-item">          <input type="radio" class="segmented-input" name="team-view" value="month" checked>Month        </label>        <label class="segmented-item">          <input type="radio" class="segmented-input" name="team-view" value="agenda">Agenda        </label>      </div>    </div>    <div class="schedule-view-body"></div>  </section></template>
1 か月単位で移動したり、日付の数字からその日を開いたり、週表示やアジェンダに切り替えたりできます。

#予定

各予定には、id、title、start、end を指定します。同じ予定には常に同じ ID を使います。終日の予定には allDay: true を指定し、開始と終了を日付 YYYY-MM-DD で表します。それ以外の予定はローカル時刻 YYYY-MM-DDTHH:mm で表します。end はその時点を含みません。13 日だけの終日の予定では終了日に 14 日を指定します。午前 0 時に終わる予定は、その直前の日までの予定として扱います。category はパレットの名前で、たとえば blue は category-blue を表します。href を指定すると予定はリンクになります。指定しない場合は、予定の id を value に持つボタンになり、ページはその操作を受け取れます。

時刻は、スケジュールを表示するタイムゾーンにすでに変換されている必要があります。繰り返しの予定は、開催回ごとに個別の予定として渡します。タイムゾーンと繰り返しはアプリケーション側で解決します。日数はカレンダーに従って正午を基準に数えるため、夏時間の切り替えで終日の予定が前日にずれることはありません。ビューは予定を編集、移動、保存しません。予定を表示し、どの予定が押されたかを伝えるだけです。

#ビヘイビア

app.js
import { schedule } from '@master/ui/behaviors/schedule.js'const team = schedule(document.querySelector('.schedule-view'), { events, today: '2026-11-13' })team.value // { date: '2026-11-13', view: 'month' }
オプション既定値
events[]上記の形式の予定
value今日を含む月最初に表示する日付とビュー。{ date, view } の形で、ビューは day、week、month、agenda のいずれか
todayブラウザーの日付今日の日付(YYYY-MM-DD)。サーバーでスケジュールを描画する場合に指定し、サーバーとブラウザーで結果を一致させます
localeページの lang曜日と月の名前に使う BCP 47 タグ
weekStartロケールの既定週の最初の曜日。0(日曜日)から 6(土曜日)
lanes3月表示の 1 日に表示する予定の数。残りは「さらに表示」ボタンにまとめます
from, to8, 18日表示と週表示で最低限表示する時間帯。それより早い予定や遅い予定があれば範囲が広がります
messages英語帯の名前、「さらに表示」ボタンの表示文言とアクセシブルな名前、アジェンダが空のときの文
drawなしタイトルと本体の書き出しを引き受けます。自分で書き出すレンダラー向けです

読み手の操作では、ルートから input と change が発行されます。ビヘイビアが返す関数には読み書きできる value があり、値を設定してもイベントは発行されません。scheduleLayout(value, options) は、ビューが表示する内容をデータとして返します。各予定のレーンを含む週、各予定の位置を含む時間帯、帯、アジェンダの日付です。そのため、サーバー、フレームワーク、ビヘイビアのいずれでも、同じ予定が同じように配置されます。

#スケジュール、ガントチャート、カレンダー

スケジュールは、時間軸上に配置した予定のためのものです。1 日の時間の流れを上から下へ読む場合も、1 か月の日付を見る場合も使えます。計画の各項目を1行ずつ割り当て、共通の時間軸に期間を示すにはガントチャートを使います。月表示から日付や日付の範囲を選ぶにはカレンダー、出来事を発生順に並べるにはタイムラインを使います。

#アクセシビリティ

  • 予定を時刻順に<ol>に並べ、アクセシブルな名前を付けます。1日分ならaria-labelを使い、複数日なら各日のschedule-dayにaria-labelledbyを指定して、その日の見出しを参照します。
  • 各予定にはタイトルと時刻をテキストで記載し、時刻には<time datetime>を使います。これにより、図がなくても「デザインレビュー、10:00から11:30まで」と読み上げられます。時刻欄は同じ時間軸を視覚化したものなので、aria-hidden="true"で支援技術から隠します。
  • 現在の予定と今日の列にはaria-currentを指定し、スクリーンリーダーがその状態を読み上げられるようにします。現在時刻の線はスタイルシートで描画されるため、時刻を伝える必要がある箇所にはテキストでも記載します。
  • 強制カラーモードでは、各予定に輪郭が付き、現在の予定はハイライト色で塗りつぶされます。細い罫線と現在時刻の線にはシステムカラーが使われます。
  • 月表示は日付グリッドではありません。日付は、その日を開く数字で、各予定はリンクまたはボタンで、その予定のタイトルと日時をアクセシブルな名前に含めます。「さらに表示」ボタンには、何日の何件の予定を一覧にするかを含めます。カテゴリーの色だけで予定を区別させることはしません。
  • ビューのコントロールで表示期間を移動しても、操作したコントロールにフォーカスが残ります。日付の数字は月表示とともに消えるため、開いた日の名前にフォーカスを移します。
  • 読者が別のタイムゾーンにいる可能性があるときは、「時刻は台北時間(GMT+8)」のように、時刻がどのタイムゾーンのものかをタイトルの近くに示します。時間軸と予定が示すのは時計の時刻だけです。

#React、Svelte、Vue

schedule コンポーネントは、scheduleLayout() から期間を書き出すため、サーバーが最初に送る HTML にスケジュールが含まれます。また、ヘッダーと日付の数字に応答するビヘイビアを適用します。値は { date, view } で、href のない予定が押されると onEventClick(Vue では eventClick)で受け取れます。サーバーで描画する場合は today と locale を指定します。npx master-ui add schedule でプロジェクトにコピーできます。構成と使い方は React、Svelte、Vue を参照してください。

ui/schedule.tsx
'use client'import { useId, useMemo, useState, type ComponentProps, type CSSProperties } from 'react'import { schedule, scheduleLayout, type ScheduleEvent, type ScheduleItem, type ScheduleMessages, type ScheduleValue } from '@master/ui/behaviors/schedule.js'import { useBehavior } from './use-behavior'export type { ScheduleEvent, ScheduleValue }/** The words of the header, in the page's language. */export interface ScheduleLabels {  today?: string  previous?: string  next?: string  /** The name of the view switch. */  view?: string  day?: string  week?: string  month?: string  agenda?: string}export interface ScheduleProps extends Omit<ComponentProps<'section'>, 'defaultValue' | 'children' | 'ref'> {  events: ScheduleEvent[]  /** The day and the view on show. Today's month by default. */  value?: ScheduleValue  defaultValue?: ScheduleValue  onValueChange?: (value: ScheduleValue) => void  /** An event without an `href` is a button: this hears it pressed. */  onEventClick?: (event: ScheduleEvent) => void  /** Today, as `YYYY-MM-DD`. Give it when the schedule is rendered on a server, so both sides agree. */  today?: string  /** A BCP 47 tag for the names. Give it when the schedule is rendered on a server. */  locale?: string  /** The first day of a week, 0 for Sunday to 6 for Saturday. The locale's own by default. */  weekStart?: number  /** How many events a day of a month shows before the rest go behind its more button. */  lanes?: number  /** The hours a day or a week shows at least. */  from?: number  to?: number  messages?: ScheduleMessages  labels?: ScheduleLabels}const chevron = (turn?: number) => (  <svg className="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M6 3.5L10.3586 7.8586A0.2 0.2 0 0 1 10.3586 8.1414L6 12.5" transform={turn ? `rotate(${turn} 8 8)` : undefined} /></svg>)const style = (properties: Record<string, string | number>) => properties as CSSProperties/** * A schedule the reader moves through by the day, the week, the month or as an agenda. React writes the * period from `scheduleLayout()`, the same layout the behavior writes, so it is in the first HTML; the behavior * answers the header and the day numbers and asks for the period to show. */export function Schedule({ events, value, defaultValue, onValueChange, onEventClick, today, locale, weekStart, lanes, from, to, messages, labels = {}, className, ...root }: ScheduleProps) {  const id = useId()  const settings = { today, locale, weekStart, lanes, from, to, messages }  const [first] = useState(() => scheduleLayout(value ?? defaultValue, settings).value)  const [shown, setShown] = useState(first)  const layout = useMemo(() => scheduleLayout(shown, { ...settings, events }), [shown, events, today, locale, weekStart, lanes, from, to, messages])  const ref = useBehavior(schedule, { ...settings, value: first, draw: setShown }, { value, defaultValue, onValueChange })  const more = messages?.more ?? ((count: number) => `+${count} more`)  const moreLabel = messages?.moreLabel ?? ((count: number, day: string) => `${count} more ${count === 1 ? 'event' : 'events'}, ${day}`)  const words = { today: 'Today', previous: 'Previous', next: 'Next', view: 'View', day: 'Day', week: 'Week', month: 'Month', agenda: 'Agenda', ...labels }  const event = (item: ScheduleItem, place?: Record<string, number>) => {    const content = <><span className="schedule-title">{item.title}</span>{item.time && !item.allDay ? <span className="schedule-time">{item.time}</span> : null}</>    const shared = { className: `schedule-event ${item.classes}`.trim(), style: place && style(Object.fromEntries(Object.entries(place).map(([name, number]) => [`--${name}`, number]))), 'aria-label': item.label }    return item.event.href      ? <a {...shared} href={item.event.href} key={`${item.id}${item.column}`}>{content}</a>      : <button type="button" {...shared} value={item.id} onClick={() => onEventClick?.(item.event)} key={`${item.id}${item.column}`}>{content}</button>  }  const list = (items: ScheduleItem[]) => <ol className="schedule-list">{items.map(item => <li key={item.id}>{event(item)}</li>)}</ol>  let body  if (layout.value.view === 'month') {    body = (      <div className="schedule-month">        <div className="schedule-weekdays" aria-hidden="true">{layout.weekdays.map(weekday => <span className="schedule-weekday" key={weekday.name}>{weekday.short}</span>)}</div>        <ol className="schedule-weeks">          {layout.weeks.map(week => (            <li className="schedule-week" style={style({ '--lanes': week.lanes })} key={week.days[0]!.date}>              {week.days.map((day, index) => [                <div className={day.outside ? 'schedule-date schedule-date-outside' : 'schedule-date'} style={style({ '--column': index + 1, '--count': day.count })} aria-current={day.today ? 'date' : undefined} key={day.date}>                  <button type="button" className="schedule-date-number" value={day.date} aria-label={day.summary}>{day.text}</button>                </div>,                ...day.items.map(item => event(item, { column: item.column, span: item.span, lane: item.lane })),                ...(day.hidden ? [                  <button type="button" className="schedule-more" style={style({ '--column': index + 1 })} popoverTarget={`${id}more${day.date}`} aria-label={moreLabel(day.hidden, day.label)} key={`${day.date}more`}>{more(day.hidden)}</button>,                  <div id={`${id}more${day.date}`} popover="" className="popover" key={`${day.date}list`}><p className="schedule-agenda-date">{day.label}</p>{list(day.all)}</div>,                ] : []),              ])}            </li>          ))}        </ol>      </div>    )  } else if (layout.value.view === 'agenda') {    body = layout.agenda.length      ? <ol className="schedule-agenda">{layout.agenda.map(day => <li className="schedule-agenda-day" aria-current={day.today ? 'date' : undefined} key={day.date}><h3 className="schedule-agenda-date">{day.heading}</h3>{list(day.items)}</li>)}</ol>      : <div className="empty"><p className="empty-title">{layout.words.empty}</p></div>  } else {    body = (      <div className="schedule" style={style({ '--schedule-from': layout.from, '--schedule-to': layout.to, '--schedule-days': layout.days.length })}>        <ol className="schedule-rail" aria-hidden="true">{layout.rail.map((label, index) => <li key={index}>{label}</li>)}</ol>        {layout.days.map((day, index) => (          <div className="schedule-day" style={style({ '--column': index + 1 })} aria-current={day.today ? 'date' : undefined} key={day.date}>            <h3 className="schedule-heading" aria-label={day.label}>{layout.days.length > 1 ? day.heading : day.label}</h3>            <ol className="schedule-events" aria-label={day.label}>{day.items.map(item => <li key={item.id}>{event(item, { start: item.start, end: item.end, lane: item.lane, lanes: item.lanes })}</li>)}</ol>          </div>        ))}        {layout.allDay.length ? (          <div className="schedule-allday" role="group" aria-label={layout.words.allDay}>            <span className="schedule-allday-label" aria-hidden="true">{layout.words.allDay}</span>            {layout.allDay.map(item => event(item, { column: item.column, span: item.span, lane: item.lane }))}          </div>        ) : null}      </div>    )  }  return (    <section className={className ? `schedule-view ${className}` : 'schedule-view'} aria-labelledby={`${id}title`} ref={ref} {...root}>      <div className="schedule-view-header">        <button type="button" className="btn btn-sm schedule-view-today">{words.today}</button>        <button type="button" className="btn btn-sm btn-square btn-quiet schedule-view-previous" aria-label={words.previous}>{chevron(180)}</button>        <button type="button" className="btn btn-sm btn-square btn-quiet schedule-view-next" aria-label={words.next}>{chevron()}</button>        <h2 className="schedule-view-title" id={`${id}title`} aria-live="polite">{layout.title}</h2>        <div className="segmented segmented-sm schedule-view-switch" role="radiogroup" aria-label={words.view}>          {(['day', 'week', 'month', 'agenda'] as const).map(name => (            <label className="segmented-item" key={name}><input type="radio" className="segmented-input" name={`${id}view`} value={name} defaultChecked={first.view === name} />{words[name]}</label>          ))}        </div>      </div>      <div className="schedule-view-body">{body}</div>    </section>  )}
ui/Schedule.svelte
<script lang="ts" module>  import type { HTMLAttributes } from 'svelte/elements'  import type { ScheduleEvent, ScheduleMessages, ScheduleValue } from '@master/ui/behaviors/schedule.js'  export type { ScheduleEvent, ScheduleValue }  /** The words of the header, in the page's language. */  export interface ScheduleLabels {    today?: string    previous?: string    next?: string    /** The name of the view switch. */    view?: string    day?: string    week?: string    month?: string    agenda?: string  }  export interface ScheduleProps extends Omit<HTMLAttributes<HTMLElement>, 'children'> {    events: ScheduleEvent[]    /** The day and the view on show. Bind it, or leave it out: today's month. */    value?: ScheduleValue    onValueChange?: (value: ScheduleValue) => void    /** An event without an `href` is a button: this hears it pressed. */    onEventClick?: (event: ScheduleEvent) => void    /** Today, as `YYYY-MM-DD`. Give it when the schedule is rendered on a server, so both sides agree. */    today?: string    /** A BCP 47 tag for the names. Give it when the schedule is rendered on a server. */    locale?: string    /** The first day of a week, 0 for Sunday to 6 for Saturday. The locale's own by default. */    weekStart?: number    /** How many events a day of a month shows before the rest go behind its more button. */    lanes?: number    /** The hours a day or a week shows at least. */    from?: number    to?: number    messages?: ScheduleMessages    labels?: ScheduleLabels  }</script><script lang="ts">  import { untrack } from 'svelte'  import { schedule, scheduleLayout, type ScheduleItem } from '@master/ui/behaviors/schedule.js'  import { behavior } from './behavior.svelte.js'  let { events, value = $bindable(), onValueChange, onEventClick, today, locale, weekStart, lanes, from, to, messages, labels = {}, class: className, ...root }: ScheduleProps = $props()  const id = $props.id()  const settings = () => ({ today, locale, weekStart, lanes, from, to, messages })  const first = untrack(() => scheduleLayout(value, settings()).value)  let shown = $state(first)  const layout = $derived(scheduleLayout(shown, { ...settings(), events }))  const attach = behavior(schedule, () => ({ ...settings(), value: first, draw: (next: ScheduleValue) => { shown = next } }), {    value: () => value,    change: (next) => { value = next; onValueChange?.(next) },  })  const more = $derived(messages?.more ?? ((count: number) => `+${count} more`))  const moreLabel = $derived(messages?.moreLabel ?? ((count: number, day: string) => `${count} more ${count === 1 ? 'event' : 'events'}, ${day}`))  const words = $derived({ today: 'Today', previous: 'Previous', next: 'Next', view: 'View', day: 'Day', week: 'Week', month: 'Month', agenda: 'Agenda', ...labels })  const views = ['day', 'week', 'month', 'agenda'] as const  const lane = (item: ScheduleItem) => `--column: ${item.column}; --span: ${item.span}; --lane: ${item.lane}`</script><!--  @component  A schedule the reader moves through by the day, the week, the month or as an agenda. Svelte writes the  period from `scheduleLayout()`, the same layout the behavior writes, so it is in the first HTML; the behavior  answers the header and the day numbers and asks for the period to show.-->{#snippet event(item: ScheduleItem, style?: string)}  {#if item.event.href}    <a class={['schedule-event', item.classes]} {style} href={item.event.href} aria-label={item.label}><span class="schedule-title">{item.title}</span>{#if item.time && !item.allDay}<span class="schedule-time">{item.time}</span>{/if}</a>  {:else}    <button type="button" class={['schedule-event', item.classes]} {style} value={item.id} aria-label={item.label} onclick={() => onEventClick?.(item.event)}><span class="schedule-title">{item.title}</span>{#if item.time && !item.allDay}<span class="schedule-time">{item.time}</span>{/if}</button>  {/if}{/snippet}{#snippet list(items: ScheduleItem[])}  <ol class="schedule-list">    {#each items as item (item.id)}<li>{@render event(item)}</li>{/each}  </ol>{/snippet}<section class={['schedule-view', className]} aria-labelledby="{id}title" {@attach attach} {...root}>  <div class="schedule-view-header">    <button type="button" class="btn btn-sm schedule-view-today">{words.today}</button>    <button type="button" class="btn btn-sm btn-square btn-quiet schedule-view-previous" aria-label={words.previous}>      <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="M6 3.5L10.3586 7.8586A0.2 0.2 0 0 1 10.3586 8.1414L6 12.5" transform="rotate(180 8 8)" /></svg>    </button>    <button type="button" class="btn btn-sm btn-square btn-quiet schedule-view-next" aria-label={words.next}>      <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="M6 3.5L10.3586 7.8586A0.2 0.2 0 0 1 10.3586 8.1414L6 12.5" /></svg>    </button>    <h2 class="schedule-view-title" id="{id}title" aria-live="polite">{layout.title}</h2>    <div class="segmented segmented-sm schedule-view-switch" role="radiogroup" aria-label={words.view}>      {#each views as name (name)}        <label class="segmented-item"><input type="radio" class="segmented-input" name="{id}view" value={name} checked={first.view === name} />{words[name]}</label>      {/each}    </div>  </div>  <div class="schedule-view-body">    {#if layout.value.view === 'month'}      <div class="schedule-month">        <div class="schedule-weekdays" aria-hidden="true">          {#each layout.weekdays as weekday (weekday.name)}<span class="schedule-weekday">{weekday.short}</span>{/each}        </div>        <ol class="schedule-weeks">          {#each layout.weeks as week (week.days[0]!.date)}            <li class="schedule-week" style="--lanes: {week.lanes}">              {#each week.days as day, index (day.date)}                <div class={['schedule-date', day.outside && 'schedule-date-outside']} style="--column: {index + 1}; --count: {day.count}" aria-current={day.today ? 'date' : undefined}>                  <button type="button" class="schedule-date-number" value={day.date} aria-label={day.summary}>{day.text}</button>                </div>                {#each day.items as item (item.id)}{@render event(item, lane(item))}{/each}                {#if day.hidden}                  <button type="button" class="schedule-more" style="--column: {index + 1}" popovertarget="{id}more{day.date}" aria-label={moreLabel(day.hidden, day.label)}>{more(day.hidden)}</button>                  <div id="{id}more{day.date}" popover="" class="popover"><p class="schedule-agenda-date">{day.label}</p>{@render list(day.all)}</div>                {/if}              {/each}            </li>          {/each}        </ol>      </div>    {:else if layout.value.view === 'agenda'}      {#if layout.agenda.length}        <ol class="schedule-agenda">          {#each layout.agenda as day (day.date)}            <li class="schedule-agenda-day" aria-current={day.today ? 'date' : undefined}><h3 class="schedule-agenda-date">{day.heading}</h3>{@render list(day.items)}</li>          {/each}        </ol>      {:else}        <div class="empty"><p class="empty-title">{layout.words.empty}</p></div>      {/if}    {:else}      <div class="schedule" style="--schedule-from: {layout.from}; --schedule-to: {layout.to}; --schedule-days: {layout.days.length}">        <ol class="schedule-rail" aria-hidden="true">          {#each layout.rail as label, index (index)}<li>{label}</li>{/each}        </ol>        {#each layout.days as day, index (day.date)}          <div class="schedule-day" style="--column: {index + 1}" aria-current={day.today ? 'date' : undefined}>            <h3 class="schedule-heading" aria-label={day.label}>{layout.days.length > 1 ? day.heading : day.label}</h3>            <ol class="schedule-events" aria-label={day.label}>              {#each day.items as item (item.id)}<li>{@render event(item, `--start: ${item.start}; --end: ${item.end}; --lane: ${item.lane}; --lanes: ${item.lanes}`)}</li>{/each}            </ol>          </div>        {/each}        {#if layout.allDay.length}          <div class="schedule-allday" role="group" aria-label={layout.words.allDay}>            <span class="schedule-allday-label" aria-hidden="true">{layout.words.allDay}</span>            {#each layout.allDay as item (item.id)}{@render event(item, lane(item))}{/each}          </div>        {/if}      </div>    {/if}  </div></section>
ui/Schedule.vue
<script lang="ts">import type { ScheduleEvent, ScheduleValue } from '@master/ui/behaviors/schedule.js'export type { ScheduleEvent, ScheduleValue }/** The words of the header, in the page's language. */export interface ScheduleLabels {  today?: string  previous?: string  next?: string  /** The name of the view switch. */  view?: string  day?: string  week?: string  month?: string  agenda?: string}</script><script setup lang="ts">import { computed, shallowRef, useId, useTemplateRef } from 'vue'import { schedule, scheduleLayout, type ScheduleItem, type ScheduleMessages } from '@master/ui/behaviors/schedule.js'import { useBehavior } from './use-behavior'defineOptions({ inheritAttrs: false })const { events, today, locale, weekStart, lanes, from, to, messages, labels = {} } = defineProps<{  events: ScheduleEvent[]  /** Today, as `YYYY-MM-DD`. Give it when the schedule is rendered on a server, so both sides agree. */  today?: string  /** A BCP 47 tag for the names. Give it when the schedule is rendered on a server. */  locale?: string  /** The first day of a week, 0 for Sunday to 6 for Saturday. The locale's own by default. */  weekStart?: number  /** How many events a day of a month shows before the rest go behind its more button. */  lanes?: number  /** The hours a day or a week shows at least. */  from?: number  to?: number  messages?: ScheduleMessages  labels?: ScheduleLabels}>()/** The day and the view on show: `v-model`. Today's month by default. */const model = defineModel<ScheduleValue>()/** An event without an `href` is a button: `eventClick` hears it pressed. */const emit = defineEmits<{ eventClick: [event: ScheduleEvent] }>()/* * A schedule the reader moves through by the day, the week, the month or as an agenda. Vue writes the period * from `scheduleLayout()`, the same layout the behavior writes, so it is in the first HTML; the behavior answers * the header and the day numbers and asks for the period to show. */const id = useId()const settings = () => ({ today, locale, weekStart, lanes, from, to, messages })const first = scheduleLayout(model.value, settings()).valueconst shown = shallowRef<ScheduleValue>(first)const layout = computed(() => scheduleLayout(shown.value, { ...settings(), events }))const root = useTemplateRef<HTMLElement>('root')useBehavior(root, schedule, () => ({ ...settings(), value: first, draw: (next: ScheduleValue) => { shown.value = next } }), model)const more = computed(() => messages?.more ?? ((count: number) => `+${count} more`))const moreLabel = computed(() => messages?.moreLabel ?? ((count: number, day: string) => `${count} more ${count === 1 ? 'event' : 'events'}, ${day}`))const words = computed(() => ({ today: 'Today', previous: 'Previous', next: 'Next', view: 'View', day: 'Day', week: 'Week', month: 'Month', agenda: 'Agenda', ...labels }))const views = ['day', 'week', 'month', 'agenda'] as constconst lane = (item: ScheduleItem) => `--column: ${item.column}; --span: ${item.span}; --lane: ${item.lane}`const hours = (item: ScheduleItem) => `--start: ${item.start}; --end: ${item.end}; --lane: ${item.lane}; --lanes: ${item.lanes}`</script><template>  <section class="schedule-view" :aria-labelledby="`${id}-title`" ref="root" v-bind="$attrs">    <div class="schedule-view-header">      <button type="button" class="btn btn-sm schedule-view-today">{{ words.today }}</button>      <button type="button" class="btn btn-sm btn-square btn-quiet schedule-view-previous" :aria-label="words.previous">        <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="M6 3.5L10.3586 7.8586A0.2 0.2 0 0 1 10.3586 8.1414L6 12.5" transform="rotate(180 8 8)" /></svg>      </button>      <button type="button" class="btn btn-sm btn-square btn-quiet schedule-view-next" :aria-label="words.next">        <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="M6 3.5L10.3586 7.8586A0.2 0.2 0 0 1 10.3586 8.1414L6 12.5" /></svg>      </button>      <h2 class="schedule-view-title" :id="`${id}-title`" aria-live="polite">{{ layout.title }}</h2>      <div class="segmented segmented-sm schedule-view-switch" role="radiogroup" :aria-label="words.view">        <label v-for="name in views" :key="name" class="segmented-item"><input type="radio" class="segmented-input" :name="`${id}-view`" :value="name" :checked="first.view === name" />{{ words[name] }}</label>      </div>    </div>    <div class="schedule-view-body">      <div v-if="layout.value.view === 'month'" class="schedule-month">        <div class="schedule-weekdays" aria-hidden="true">          <span v-for="weekday in layout.weekdays" :key="weekday.name" class="schedule-weekday">{{ weekday.short }}</span>        </div>        <ol class="schedule-weeks">          <li v-for="week in layout.weeks" :key="week.days[0]!.date" class="schedule-week" :style="`--lanes: ${week.lanes}`">            <template v-for="(day, index) in week.days" :key="day.date">              <div class="schedule-date" :class="{ 'schedule-date-outside': day.outside }" :style="`--column: ${index + 1}; --count: ${day.count}`" :aria-current="day.today ? 'date' : undefined">                <button type="button" class="schedule-date-number" :value="day.date" :aria-label="day.summary">{{ day.text }}</button>              </div>              <template v-for="item in day.items" :key="item.id">                <a v-if="item.event.href" :class="['schedule-event', item.classes]" :style="lane(item)" :href="item.event.href" :aria-label="item.label"><span class="schedule-title">{{ item.title }}</span><span v-if="item.time && !item.allDay" class="schedule-time">{{ item.time }}</span></a>                <button v-else type="button" :class="['schedule-event', item.classes]" :style="lane(item)" :value="item.id" :aria-label="item.label" @click="emit('eventClick', item.event)"><span class="schedule-title">{{ item.title }}</span><span v-if="item.time && !item.allDay" class="schedule-time">{{ item.time }}</span></button>              </template>              <template v-if="day.hidden">                <button type="button" class="schedule-more" :style="`--column: ${index + 1}`" :popovertarget="`${id}-more-${day.date}`" :aria-label="moreLabel(day.hidden, day.label)">{{ more(day.hidden) }}</button>                <div :id="`${id}-more-${day.date}`" popover="" class="popover">                  <p class="schedule-agenda-date">{{ day.label }}</p>                  <ol class="schedule-list">                    <li v-for="item in day.all" :key="item.id">                      <a v-if="item.event.href" :class="['schedule-event', item.classes]" :href="item.event.href" :aria-label="item.label"><span class="schedule-title">{{ item.title }}</span><span v-if="item.time && !item.allDay" class="schedule-time">{{ item.time }}</span></a>                      <button v-else type="button" :class="['schedule-event', item.classes]" :value="item.id" :aria-label="item.label" @click="emit('eventClick', item.event)"><span class="schedule-title">{{ item.title }}</span><span v-if="item.time && !item.allDay" class="schedule-time">{{ item.time }}</span></button>                    </li>                  </ol>                </div>              </template>            </template>          </li>        </ol>      </div>      <template v-else-if="layout.value.view === 'agenda'">        <ol v-if="layout.agenda.length" class="schedule-agenda">          <li v-for="day in layout.agenda" :key="day.date" class="schedule-agenda-day" :aria-current="day.today ? 'date' : undefined">            <h3 class="schedule-agenda-date">{{ day.heading }}</h3>            <ol class="schedule-list">              <li v-for="item in day.items" :key="item.id">                <a v-if="item.event.href" :class="['schedule-event', item.classes]" :href="item.event.href" :aria-label="item.label"><span class="schedule-title">{{ item.title }}</span><span v-if="item.time && !item.allDay" class="schedule-time">{{ item.time }}</span></a>                <button v-else type="button" :class="['schedule-event', item.classes]" :value="item.id" :aria-label="item.label" @click="emit('eventClick', item.event)"><span class="schedule-title">{{ item.title }}</span><span v-if="item.time && !item.allDay" class="schedule-time">{{ item.time }}</span></button>              </li>            </ol>          </li>        </ol>        <div v-else class="empty"><p class="empty-title">{{ layout.words.empty }}</p></div>      </template>      <div v-else class="schedule" :style="`--schedule-from: ${layout.from}; --schedule-to: ${layout.to}; --schedule-days: ${layout.days.length}`">        <ol class="schedule-rail" aria-hidden="true"><li v-for="(label, index) in layout.rail" :key="index">{{ label }}</li></ol>        <div v-for="(day, index) in layout.days" :key="day.date" class="schedule-day" :style="`--column: ${index + 1}`" :aria-current="day.today ? 'date' : undefined">          <h3 class="schedule-heading" :aria-label="day.label">{{ layout.days.length > 1 ? day.heading : day.label }}</h3>          <ol class="schedule-events" :aria-label="day.label">            <li v-for="item in day.items" :key="item.id">              <a v-if="item.event.href" :class="['schedule-event', item.classes]" :style="hours(item)" :href="item.event.href" :aria-label="item.label"><span class="schedule-title">{{ item.title }}</span><span v-if="item.time" class="schedule-time">{{ item.time }}</span></a>              <button v-else type="button" :class="['schedule-event', item.classes]" :style="hours(item)" :value="item.id" :aria-label="item.label" @click="emit('eventClick', item.event)"><span class="schedule-title">{{ item.title }}</span><span v-if="item.time" class="schedule-time">{{ item.time }}</span></button>            </li>          </ol>        </div>        <div v-if="layout.allDay.length" class="schedule-allday" role="group" :aria-label="layout.words.allDay">          <span class="schedule-allday-label" aria-hidden="true">{{ layout.words.allDay }}</span>          <template v-for="item in layout.allDay" :key="item.id">            <a v-if="item.event.href" :class="['schedule-event', item.classes]" :style="lane(item)" :href="item.event.href" :aria-label="item.label"><span class="schedule-title">{{ item.title }}</span><span v-if="item.time && !item.allDay" class="schedule-time">{{ item.time }}</span></a>            <button v-else type="button" :class="['schedule-event', item.classes]" :style="lane(item)" :value="item.id" :aria-label="item.label" @click="emit('eventClick', item.event)"><span class="schedule-title">{{ item.title }}</span><span v-if="item.time && !item.allDay" class="schedule-time">{{ item.time }}</span></button>          </template>        </div>      </div>    </div>  </section></template>

#クラス

クラス説明
schedule--schedule-from から --schedule-to まで、1 時間あたりの高さは --schedule-hour。始端に時刻ラベルのレールを置き、続けて日ごとに 1 列を配置。
schedule-now--now の位置で、aria-current="date" が付いた日の列にはドット付きの線を、ほかの日の列には極細線を引きます。aria-current="date" が付いた日がなければ、すべての日の列にドット付きの線を引きます。schedule と併用します
schedule-rail--schedule-from から --schedule-to まで、1時間につき1つの時刻ラベルを、対応する細線の中央に配置します。各イベントには時刻をテキストで記載するため、時刻ラベルのレールは aria-hidden で支援技術から隠します。
schedule-day複数日を横に並べるときの1日分の列。schedule-headingは任意で、その下にschedule-eventsを配置。今日にはaria-current="date"を指定。1日だけのスケジュールでは列を省略可
schedule-heading各日の見出しを列の上に控えめな文字色で表示します。今日の見出しには強調文字色を使います。
schedule-events1 日のイベントを時刻順に、時間軸の細線に沿って配置します。毎正時に 1 本、各日の開始側に縦線を 1 本引きます。
schedule-event--startから--endまでのイベント1件を、レーン--lane(全--lanesレーン)に配置。淡いインク色のシートで、始端の内側に角を丸めたインク色のバーを置き、細線から1px離す。リスト項目か、その中のリンクまたはボタンに指定。短いイベントは1行で表示
schedule-titleイベントの内容。省略記号で終わる 1 行です。時間帯、月表示、リスト、アジェンダのどこにあっても、イベントの中に置きます
schedule-time<time> 要素で書く日時。タイトルの下に控えめな 1 行で表示し、短いイベントで両方が収まる場合はタイトルの横に表示します。時間帯、月表示、リスト、アジェンダのどこにあっても、イベントの中に置きます
schedule-event-lane時間帯ではなくレーンに置きます。--column 日目から --span 日分を、--lane 番目のレーンに 1 行の高さで表示します。終日の帯、月表示、イベントのリストに使いますschedule-event と併用します
schedule-event-continuedそれより前に始まったイベントの一部。時間帯では上端が、レーンでは開始側の端が角張り、バーは表示されませんschedule-event と併用します
schedule-event-continuesそれより後まで続くイベントの一部。時間帯では下端が、レーンでは終了側の端が角張りますschedule-event と併用します
schedule-event-plain月表示やリストの短いイベント。シートはなく、バーの代わりにドットを置き、続けて時刻とタイトルを表示しますschedule-event と併用します
schedule-event-categoryイベント自身またはその祖先に付けた category-<name> クラスが定めるカテゴリーのシート、バー、文字の色schedule-event と併用します
schedule-allday見出しの下で日の列にまたがる、終日続くもののための帯。各日は --column で自分の列を示し、スケジュールは列の数を --schedule-days で示します。schedule-allday-label とレーンのイベントを保持します
schedule-allday-label時刻欄の列に表示する帯の名前(「終日」など)。aria-hidden を付け、帯には aria-label で名前を付けます
schedule-month月表示。schedule-weekdays の下に schedule-weeks を置きます。狭い領域では、各日にレーンの代わりにイベントごとのドットを表示します
schedule-weekdays週の上に並ぶ曜日の名前。各日の数字に完全な名前が付いているため、aria-hidden で隠します
schedule-weekday1 つの曜日の名前
schedule-weeks順に並ぶ週
schedule-week1 週間。7 日分で、1 行目に日付の数字、--lanes 行分のイベント、「さらに表示」ボタンの行で構成します。各日、その日に始まるイベント、その日の「さらに表示」ボタンの順に書き、日付の順に読まれるようにします
schedule-date1 日。--column の列で週の上端から下端までを占めるセルで、--count はその日のイベント数です。今日には aria-current="date" を付けます
schedule-date-outside前月または翌月の日。淡いトレイの上に控えめな数字で表示しますschedule-date と併用します
schedule-date-number日付の数字。その日を開く丸いボタンで、アクセシブルな名前は完全な日付とイベント数です。今日の数字はインク色です
schedule-moreレーンに収まらないその日の残りのイベント。週の最後の行の --column の列に置きます。その日のイベントを一覧にしたポップオーバーを開きます。アクセシブルな名前で、何件あるか、何日のものかを伝えます
schedule-list順に並ぶイベント。レーンのイベントを上下に重ねて表示します。ポップオーバーではその日のイベントを、アジェンダでは各日のイベントを並べます
schedule-agenda期間内でイベントのある日を 1 日 1 行で並べます。先頭に日付を置き、その横に schedule-list を置きます。狭い領域では日付を schedule-list の上に置きます
schedule-agenda-dayアジェンダの 1 日。今日には aria-current="date" を付けます
schedule-agenda-dateその日の日付。行の先頭、またはポップオーバー内のその日のリストの上に置きます。今日の日付は強いインク色です
schedule-view読み手が操作するスケジュール。schedule-view-body の上に schedule-view-header を置き、schedule ビヘイビアで動作します
schedule-view-headerコントロール。今日、前へ、次へ、期間の名前、ビューの切り替えで構成します。狭い領域では、期間の名前を独立した 1 行に置きます
schedule-view-title表示中の期間(「2026年11月」など)。移動が読み上げられるよう aria-live="polite" を付けます
schedule-view-previousビューの期間単位で前に戻ります
schedule-view-nextビューの期間単位で次に進みます
schedule-view-today今日を含む期間に移動します
schedule-view-switchビューを選ぶラジオボタン(値は day、week、month、agenda)を保持します。セグメントコントロールです
schedule-view-bodyビヘイビアが期間を書き出す場所。日または週の schedule、schedule-month、schedule-agenda のいずれかです

#カスタムプロパティ

プロパティ既定値説明
--schedule-from8開始時刻。0〜24 の範囲で、小数も指定できます。
--schedule-to18スケジュールの終了時刻。
--schedule-hour3rem1 時間分の高さ。
--schedule-rail3remラベルを並べるレールの幅
--schedule-colorvar(--color-surface-inverse)イベントの淡い塗りと縁取りに使うインク色
--nowschedule-now の線が示す時刻。たとえば 13 時 30 分なら 13.5。指定先:schedule
--startイベントの開始時刻。指定先:schedule-event
--endイベントの終了時刻。指定先:schedule-event
--lane時間が重なるイベント間での位置です。先頭は 0 で、既定値も 0 です。指定先:schedule-event
--lanesこのイベントの位置で横に並ぶイベントの数です。既定値は 1 です。指定先:schedule-event
--schedule-days横に並ぶ日の列の数。終日の帯があるスケジュールで使います。既定は 1 です指定先:schedule
--columnレーンでは、その行でイベントが始まる日(1 から数えます)。schedule-day、schedule-date、schedule-more では、その列指定先:schedule-event
--spanレーンでは、その行でイベントが占める日数。既定は 1 です指定先:schedule-event
--lanes1 週間に表示するイベントのレーン数。既定は 3 です指定先:schedule-week
--count0その日のイベント数。狭い月表示では最大 3 つのドットで描画します指定先:schedule-date

#ソース

@master/ui/components/schedule.css
/* * Schedule: a day as hours down a rail, each event as tall as it lasts. * The hours run from --schedule-from to --schedule-to, each --schedule-hour tall, with a hairline at every * hour. A rail of labels stands at the start, each label on the middle of its hairline; it is a picture of the * scale and is hidden from assistive technology. The events of a day are an ordered list: each sets --start * and --end in hours and says its title and its time in words, so the list reads without the drawing. * An event is a quiet sheet of tinted ink with a rounded ink bar standing inside its start, straight from end * to end where an edge drawn along the sheet would bend round its corners. It is inset from the hairlines so that two * events that meet keep a line between them. Events that overlap share the width: --lane is the event's place * and --lanes how many stand side by side. An event is a size container, so a short one keeps its title on * one line, puts the time beside it when there is room, and with no room for a line shows only its sheet. * The event marked aria-current is ink. schedule-now draws an ink line with a dot at --now, through the day * marked aria-current="date", and as a hairline through the other days; it passes under the events, so it * never strikes through their words. * Several days stand side by side as schedule-day columns, each with an optional heading over it. * Everything is placed by the stylesheet; nothing is measured by a script. * * Events that last whole days stand in lanes rather than on the hours: in schedule-allday, a band under the * headings, and in schedule-month, a month as weeks of seven days. Such an event (schedule-event-lane) spans * --span days from day --column on lane --lane; a piece that began in an earlier week or goes on past this one * is schedule-event-continued or schedule-event-continues, with square ends where it goes on. An event of a few * hours in a month is plain: a dot, its time and its title. A day of a month shows three lanes and a * schedule-more button for the rest; in a narrow month the lanes give way to a dot for each event under the day's * number, which opens the day. schedule-agenda lists the same events by day, for a narrow room or a reader who * would rather read than look. A category colors an event's sheet, bar and words (schedule-event-category). * * schedule-view is the schedule a reader works: a header with previous, today and next, the period's name and a * switch between day, week, month and agenda, over a body the schedule behavior writes from the events. */@layer components.ui {  .schedule {    --schedule-from: 8;    --schedule-to: 18;    --schedule-hour: 3rem;    --schedule-rail: 3rem;    --schedule-color: var(--color-surface-inverse);    /* The surface the schedule stands on, which a card or a sheet publishes; the event's tint is mixed with it. */    --schedule-surface: var(--surface-color, var(--color-surface-base));    --schedule-span: calc(var(--schedule-to) - var(--schedule-from));    display: grid;    grid-template-rows: auto calc(var(--schedule-span) * var(--schedule-hour));    grid-template-columns: var(--schedule-rail);    grid-auto-columns: minmax(0, 1fr);    grid-auto-flow: column;    min-width: 0;    margin: 0;    padding-block-end: .5rem;    color: var(--color-text-body);    font: 400 .8125rem/1.25rem var(--font-family-sans);    font-feature-settings: inherit;    font-variant-numeric: tabular-nums;    /* Without headings, the first label stands half above the first hour: keep it in the box. */    &:not(:has(.schedule-heading)) {      padding-block-start: .5rem;    }    /*     * With an all-day band, the headings, the band and the hours are three rows. The band runs across the days, so     * each day names its column with --column, from 1, and the schedule says how many there are in --schedule-days.     */    &:has(.schedule-allday) {      grid-template-rows: auto auto calc(var(--schedule-span) * var(--schedule-hour));      .schedule-rail {        grid-row: 3;      }      .schedule-day {        grid-column: calc(var(--column) + 1);        grid-row: 1 / span 3;      }      .schedule-events {        grid-row: 3;      }    }    /* Now: an ink line across the day, and a dot where it meets the day's edge. */    &.schedule-now .schedule-events {      &::before, &::after {        content: '';        position: absolute;        pointer-events: none;      }      /* The line passes under the events, so it never strikes through their words. */      &::after {        z-index: 0;        top: calc((var(--now, var(--schedule-from)) - var(--schedule-from)) * var(--schedule-hour));        inset-inline: 0;        height: 1px;        background: var(--color-text-strong);      }      &::before {        top: calc((var(--now, var(--schedule-from)) - var(--schedule-from)) * var(--schedule-hour) - 3px);        inset-inline-start: -3px;        width: 7px;        height: 7px;        z-index: 2;        border-radius: 999px;        corner-shape: round;        background: var(--color-text-strong);        box-shadow: 0 0 0 1.5px var(--schedule-surface);      }      @media (forced-colors: active) {        &::before, &::after {          forced-color-adjust: none;          background: CanvasText;        }      }    }    /* When one day is today, the line runs through the others as a hairline, with no dot. */    &.schedule-now:has(.schedule-day[aria-current="date"]) .schedule-day:not([aria-current="date"]) .schedule-events {      &::before {        content: none;      }      &::after {        background: var(--color-line-mark);        /* Kept out of forced colors with the line, so the hairline is the system's gray rather than a faint ink. */        @media (forced-colors: active) {          background: GrayText;        }      }    }    /* The ring that cuts the dot of now out of the line is the canvas, as a chart's and a heatmap's surface is. */    @media (forced-colors: active) {      --schedule-color: CanvasText;      --schedule-surface: Canvas;    }  }  /* The labels of the hours, one to an hour, each centered on its hairline. */  .schedule-rail {    display: grid;    grid-area: 2 / 1;    grid-auto-rows: var(--schedule-hour);    align-content: start;    margin: -.5rem 0 0;    padding: 0;    padding-inline-end: .5rem;    color: var(--color-text-muted);    /* The size of a chart's and a gantt's ticks. */    font-size: .71875rem;    line-height: 1rem;    list-style: none;    text-align: end;    white-space: nowrap;  }  /* One day: its heading over its events, on the schedule's own rows. */  .schedule-day {    display: grid;    grid-row: 1 / span 2;    grid-template-rows: subgrid;    min-width: 0;    margin: 0;  }  /* The name of a day, over its column. Today's takes the strong ink. */  .schedule-heading {    grid-row: 1;    min-width: 0;    margin: 0;    padding-block-end: .75rem;    overflow: hidden;    color: var(--color-text-muted);    font-size: .75rem;    font-weight: var(--font-weight-control);    line-height: 1rem;    text-align: center;    text-overflow: ellipsis;    white-space: nowrap;    .schedule-day[aria-current="date"] & {      color: var(--color-text-strong);    }  }  /*   * The events of a day, and the scale behind them: a hairline at every hour, one down the day's start, and   * the closing hairline under the last hour. The hours begin after the upright line, so no crossing is drawn twice.   */  .schedule-events {    --schedule-inset: 2px;    --schedule-inset-end: .5rem;    --schedule-lane-gap: 3px;    --schedule-line: var(--color-line-hair);    position: relative;    grid-row: 2;    min-width: 0;    margin: 0;    padding: 0;    /* Events, the line of now and a focused event stack inside the day, never over a sticky heading above it. */    isolation: isolate;    background:      linear-gradient(var(--schedule-line), var(--schedule-line)) left / 1px 100% no-repeat,      repeating-linear-gradient(180deg, var(--schedule-line) 0 1px, transparent 1px var(--schedule-hour)) right / calc(100% - 1px) 100% no-repeat;    box-shadow: 0 1px 0 var(--schedule-line);    list-style: none;    &:dir(rtl) {      background:        linear-gradient(var(--schedule-line), var(--schedule-line)) right / 1px 100% no-repeat,        repeating-linear-gradient(180deg, var(--schedule-line) 0 1px, transparent 1px var(--schedule-hour)) left / calc(100% - 1px) 100% no-repeat;    }    /* The hairlines stay, in the system's gray; the events inside keep the system's colors. */    @media (forced-colors: active) {      --schedule-line: GrayText;      forced-color-adjust: none;    }  }  /*   * One event, from --start to --end in hours, in lane --lane of --lanes. It stands a pixel clear of the   * hairline over it and the one under it. It goes on the list item, or on a link or a button inside one.   */  .schedule-event {    --schedule-length: calc((var(--end, 1) - var(--start, 0)) * var(--schedule-hour) - 3px);    --schedule-cell: calc((100% - var(--schedule-inset) - var(--schedule-inset-end) + var(--schedule-lane-gap)) / var(--lanes, 1));    --schedule-tint: color-mix(in oklab, var(--schedule-color) 7%, var(--schedule-surface));    --schedule-edge: color-mix(in oklab, var(--schedule-color) 62%, transparent);    --schedule-bar: 3px;    --schedule-bar-inset: 3px;    position: absolute;    z-index: 1;    top: calc((var(--start, 0) - var(--schedule-from)) * var(--schedule-hour) + 2px);    inset-inline-start: calc(var(--schedule-inset) + var(--lane, 0) * var(--schedule-cell));    container: schedule-event / size;    display: flex;    flex-flow: row wrap;    align-content: flex-start;    column-gap: .375rem;    box-sizing: border-box;    width: calc(var(--schedule-cell) - var(--schedule-lane-gap));    height: max(var(--schedule-length), 2px);    margin: 0;    /* A short event centers its one line; a longer one keeps the same inset at its top. */    padding: clamp(0px, (var(--schedule-length) - 1rem) / 2, .25rem) .375rem;    padding-inline-start: calc(var(--schedule-bar-inset) + var(--schedule-bar) + .3125rem);    border: 0;    border-radius: calc(var(--radius-chip) * var(--corner-scale));    corner-shape: var(--corner-shape);    overflow: hidden;    background: var(--schedule-tint);    color: var(--color-text-strong);    box-shadow: inset 0 0 0 .5px color-mix(in oklab, var(--schedule-color) 12%, transparent);    font: inherit;    font-feature-settings: inherit;    text-align: start;    text-decoration: none;    appearance: none;    -webkit-tap-highlight-color: transparent;    /* A button the behavior writes for an event the page opens answers the pointer as a link does. */    &:enabled {      cursor: pointer;    }    /*     * The bar: 3px wide, 3px in from the start and from the top and bottom, round at both ends, in a firm tint     * of the ink so it marks the event without shouting over its words. On an event too short to hold it     * inset, it comes out to the sheet's edges and stays a line rather than shrinking to a dot.     */    &::before {      content: '';      position: absolute;      inset-block: clamp(0px, (var(--schedule-length) - 12px) / 2, var(--schedule-bar-inset));      inset-inline-start: var(--schedule-bar-inset);      width: var(--schedule-bar);      border-radius: calc(var(--schedule-bar) / 2);      corner-shape: round;      background: var(--schedule-edge);      pointer-events: none;      @media (forced-colors: active) {        forced-color-adjust: none;        background: CanvasText;      }    }    /*     * In a lane: --span days from day --column, on lane --lane, one line high. In a month the first row is the     * day's number; in the all-day band the first column is the rail's.     */    &.schedule-event-lane {      --schedule-length: var(--schedule-lane-height, 1.375rem);      position: relative;      top: auto;      inset-inline-start: auto;      grid-column: calc(var(--column, 1) + var(--schedule-lane-column, 0)) / span var(--span, 1);      grid-row: calc(var(--lane, 0) + var(--schedule-lane-row, 1));      flex-wrap: nowrap;      align-items: center;      align-content: center;      width: auto;      min-width: 0;      height: var(--schedule-length);      margin-inline: 2px;      padding-block: 0;    }    /*     * A piece of an event that began before what is shown, or goes on after it: on the hours, past midnight, its     * top or its bottom is square and the bar runs to that edge; in a lane, past the week, its start or its end.     */    &.schedule-event-continued {      border-start-start-radius: 0;      border-start-end-radius: 0;      &::before {        inset-block-start: 0;        border-start-start-radius: 0;        border-start-end-radius: 0;      }    }    &.schedule-event-continues {      border-end-start-radius: 0;      border-end-end-radius: 0;      &::before {        inset-block-end: 0;        border-end-start-radius: 0;        border-end-end-radius: 0;      }    }    &.schedule-event-lane.schedule-event-continued {      margin-inline-start: 0;      padding-inline-start: .5rem;      border-start-start-radius: 0;      border-end-start-radius: 0;      border-start-end-radius: calc(var(--radius-chip) * var(--corner-scale));      border-end-end-radius: calc(var(--radius-chip) * var(--corner-scale));      /* It is not the start, so it has no bar. */      &::before {        content: none;      }    }    &.schedule-event-lane.schedule-event-continues {      margin-inline-end: 0;      border-start-end-radius: 0;      border-end-end-radius: 0;      &:not(.schedule-event-continued) {        border-start-start-radius: calc(var(--radius-chip) * var(--corner-scale));        border-end-start-radius: calc(var(--radius-chip) * var(--corner-scale));      }      &::before {        inset-block: clamp(0px, (var(--schedule-length) - 12px) / 2, var(--schedule-bar-inset));        border-radius: calc(var(--schedule-bar) / 2);      }    }    /* Plain: an event of a few hours in a month. No sheet, a dot for the bar, then its time and its title. */    &.schedule-event-plain {      --schedule-tint: transparent;      /* The words start as far past the dot as the dot stands in: at the bar's inset they touched it. */      padding-inline-start: calc(.3125rem + 6px + .3125rem);      box-shadow: none;      color: var(--color-text-body);      &::before {        inset-block: calc(50% - 3px);        inset-inline-start: .3125rem;        width: 6px;        height: 6px;        border-radius: 999px;        background: var(--schedule-edge);      }      .schedule-time {        flex: none;        order: -1;      }    }    /* A category: its surface for the sheet, its mark for the bar and its text for the words. */    &.schedule-event-category {      --schedule-tint: var(--category-surface, color-mix(in oklab, var(--schedule-color) 7%, var(--schedule-surface)));      --schedule-edge: var(--category-mark, color-mix(in oklab, var(--schedule-color) 62%, transparent));      color: var(--category-text, var(--color-text-strong));      box-shadow: inset 0 0 0 .5px var(--category-line, color-mix(in oklab, var(--schedule-color) 12%, transparent));      /* A plain event keeps the body's ink: its dot carries the category. */      &.schedule-event-plain {        --schedule-tint: transparent;        box-shadow: none;        color: var(--color-text-body);      }    }    /* Under the pointer the sheet is a step firmer, at once. */    @media (hover: hover) {      &:hover:not([aria-current="true"]) {        --schedule-tint: color-mix(in oklab, var(--schedule-color) 12%, var(--schedule-surface));      }      &.schedule-event-category:hover:not([aria-current="true"]) {        --schedule-tint: color-mix(in oklab, var(--category-mark, var(--schedule-color)) 14%, var(--category-surface, var(--schedule-surface)));      }      &.schedule-event-plain:hover:not([aria-current="true"]) {        --schedule-tint: color-mix(in oklab, var(--schedule-color) 6%, transparent);      }    }    /* The event that matters now, or the one that is open: ink. */    &[aria-current="true"] {      --schedule-edge: color-mix(in oklab, var(--color-text-inverse) 55%, transparent);      background: var(--schedule-color);      color: var(--color-text-inverse);      box-shadow: var(--shadow-ink-top);    }    &:focus-visible, &:has(:focus-visible) {      @apply --focus-ring;      z-index: 3;    }    @media (forced-colors: active) {      forced-color-adjust: auto;      outline: 1px solid CanvasText;      outline-offset: -1px;      &[aria-current="true"] {        forced-color-adjust: none;        background: Highlight;        color: HighlightText;        /* The bar stands on the highlight now, so it takes the highlight's text color, as the words do. */        &::before {          background: HighlightText;        }      }      /* The focus ring is the system's highlight, as every control's is in forced colors. */      &:focus-visible, &:has(:focus-visible) {        outline: 2px solid Highlight;        outline-offset: 2px;      }    }  }  /* What the event is: one line that ends in an ellipsis. */  .schedule-title {    flex: 1 0 100%;    min-width: 0;    margin: 0;    overflow: hidden;    font-size: .75rem;    font-weight: var(--font-weight-control);    line-height: 1rem;    text-overflow: ellipsis;    white-space: nowrap;  }  /* When it is: a quiet line under the title, in tabular figures. */  .schedule-time {    flex: 1 0 100%;    min-width: 0;    margin: 0;    overflow: hidden;    color: var(--color-text-muted);    font-size: .6875rem;    line-height: 1rem;    text-overflow: ellipsis;    white-space: nowrap;    .schedule-event[aria-current="true"] & {      color: color-mix(in oklab, var(--color-text-inverse) 72%, transparent);    }    /* On a category's surface the time keeps the category's text, which is the ink that reads there. */    .schedule-event-category:not([aria-current="true"]) & {      color: inherit;    }    @media (forced-colors: active) {      color: inherit;    }  }  /* A short event: the time beside the title when both fit, and under it, out of sight, when they do not. */  @container schedule-event (height < 2rem) {    .schedule-title, .schedule-time {      flex: 0 1 auto;    }    .schedule-time {      flex-shrink: 0;    }  }  /* Under a line's height: the sheet alone. Its words stay for assistive technology. */  @container schedule-event (height < .875rem) {    .schedule-title, .schedule-time {      opacity: 0;    }  }}@layer components.ui {  /*   * The all-day band: a row under the headings, across the days, with a lane for each event that runs a whole   * day or more. Its first column is the rail's, where its name stands. A hairline closes it above the hours.   */  .schedule-allday {    --schedule-lane-column: 1;    display: grid;    grid-row: 2;    grid-column: 1 / span calc(var(--schedule-days, 1) + 1);    grid-template-columns: subgrid;    grid-auto-rows: 1.375rem;    row-gap: 2px;    align-content: start;    min-height: 1.375rem;    margin: 0 0 .5rem;    padding: 0 0 .375rem;    box-shadow: 0 1px 0 var(--color-line-hair);    list-style: none;    /* The closing hairline is a shadow, which forced colors drop: a line of the system's gray takes a pixel of the padding. */    @media (forced-colors: active) {      padding-block-end: calc(.375rem - 1px);      border-block-end: 1px solid GrayText;    }  }  /* The name of the band, in the rail: "All day". */  .schedule-allday-label {    grid-column: 1;    grid-row: 1;    align-self: center;    padding-inline-end: .5rem;    color: var(--color-text-muted);    font-size: .71875rem;    line-height: 1rem;    text-align: end;    white-space: nowrap;  }  /*   * A month: the names of the weekdays over its weeks. It is a size container, so a narrow month shows each day's   * events as dots under its number and leaves the words to the day it opens.   */  .schedule-month {    --schedule-color: var(--color-surface-inverse);    --schedule-surface: var(--surface-color, var(--color-surface-base));    container: schedule-month / inline-size;    display: grid;    grid-template-columns: minmax(0, 1fr);    min-width: 0;    color: var(--color-text-body);    font: 400 .8125rem/1.25rem var(--font-family-sans);    font-feature-settings: inherit;    font-variant-numeric: tabular-nums;    @media (forced-colors: active) {      --schedule-color: CanvasText;    }  }  .schedule-weekdays {    display: grid;    grid-template-columns: repeat(7, minmax(0, 1fr));    padding-block-end: .5rem;    color: var(--color-text-muted);    font-size: .75rem;    font-weight: var(--font-weight-control);    line-height: 1rem;  }  .schedule-weekday {    min-width: 0;    padding-inline: .5rem;    overflow: hidden;    text-overflow: ellipsis;    white-space: nowrap;  }  .schedule-weeks {    display: grid;    margin: 0;    padding: 0;    box-shadow: 0 -1px 0 var(--color-line-hair);    list-style: none;  }  /*   * A week: seven columns, the day's number on the first row, --lanes rows of events under it, and a row for the   * days that have more than the lanes hold. Each day is a cell from the top to the bottom of the week.   */  .schedule-week {    --schedule-lane-row: 2;    display: grid;    grid-template-columns: repeat(7, minmax(0, 1fr));    grid-template-rows: 2.25rem repeat(var(--lanes, 3), 1.375rem) 1.375rem;    row-gap: 2px;    padding-block-end: .375rem;    box-shadow: 0 1px 0 var(--color-line-hair);  }  /* A day of a month: a cell the height of its week, with a hairline at its end. */  .schedule-date {    --count: 0;    display: flex;    flex-direction: column;    align-items: flex-start;    grid-column: var(--column, 1);    grid-row: 1 / -1;    min-width: 0;    margin-block-end: -.375rem;    padding: .375rem;    /* A hairline at the end of every day but the last of the week, which stands at the month's edge. */    box-shadow: inset calc(-1px * min(1, 7 - var(--column, 1))) 0 0 var(--color-line-hair);    &:dir(rtl) {      box-shadow: inset calc(1px * min(1, 7 - var(--column, 1))) 0 0 var(--color-line-hair);    }    /* A day of the month before or after: a quieter number on a faint tray. */    &.schedule-date-outside {      background: color-mix(in oklab, var(--color-surface-tray) 45%, transparent);      color: var(--color-text-muted);    }    /*     * The month's hairlines are shadows, which forced colors drop: every day is outlined in the system's gray     * instead, half a pixel in, so the outlines of neighbors fall on one line. A day outside the month is gray too.     */    @media (forced-colors: active) {      outline: 1px solid GrayText;      outline-offset: -.5px;      &.schedule-date-outside {        color: GrayText;      }    }  }  /* The day's number: a round button that opens the day. Today's is ink. */  .schedule-date-number {    display: inline-grid;    flex: none;    place-items: center;    min-width: 1.5rem;    height: 1.5rem;    margin: 0;    padding: 0 .3125rem;    border: 0;    border-radius: 999px;    corner-shape: round;    background: transparent;    color: inherit;    font: var(--font-weight-control) .75rem/1 var(--font-family-sans);    font-feature-settings: inherit;    font-variant-numeric: tabular-nums;    text-decoration: none;    appearance: none;    cursor: pointer;    -webkit-tap-highlight-color: transparent;    @media (hover: hover) {      &:hover {        background: var(--color-surface-chip);        color: var(--color-text-strong);      }    }    &:focus-visible {      @apply --focus-ring;    }    .schedule-date[aria-current="date"] & {      background: var(--color-surface-inverse);      color: var(--color-text-inverse);      box-shadow: var(--shadow-ink-top);    }    @media (forced-colors: active) {      .schedule-date[aria-current="date"] & {        forced-color-adjust: none;        background: Highlight;        color: HighlightText;      }      &:focus-visible {        outline-color: Highlight;      }    }  }  /* The rest of a day's events, past its lanes: a quiet button on the week's last row that lists them. */  .schedule-more {    grid-column: var(--column, 1);    grid-row: -2;    justify-self: start;    align-self: center;    margin: 0 2px;    padding: 0 .375rem;    height: 1.25rem;    border: 0;    border-radius: calc(var(--radius-chip) * var(--corner-scale));    corner-shape: var(--corner-shape);    background: transparent;    color: var(--color-text-muted);    font: var(--font-weight-control) .6875rem/1 var(--font-family-sans);    font-feature-settings: inherit;    /* The font shorthand resets the figures the month sets: the count keeps its tabular ones. */    font-variant-numeric: tabular-nums;    white-space: nowrap;    appearance: none;    cursor: pointer;    -webkit-tap-highlight-color: transparent;    /* 20px tall in its lane: on touch its target reaches 24px, as far as the lanes over and under it allow. */    @media (pointer: coarse) {      position: relative;      &::after {        content: '';        position: absolute;        inset: -2px 0;      }    }    @media (hover: hover) {      &:hover {        background: var(--color-surface-chip);        color: var(--color-text-strong);      }    }    &:focus-visible {      @apply --focus-ring;      @media (forced-colors: active) {        outline-color: Highlight;      }    }  }  /* A narrow month: a dot for each event, three at most, under the day's number; the number opens the day. */  @container schedule-month (width < 36rem) {    .schedule-week {      grid-template-rows: 3rem;      padding-block-end: 0;      .schedule-event, .schedule-more {        display: none;      }    }    .schedule-weekday {      padding-inline: 0;      text-align: center;    }    .schedule-date {      align-items: center;      margin-block-end: 0;      padding: .25rem 0;      &::after {        content: '';        width: calc(min(var(--count), 3) * 6px);        height: 4px;        margin-block-start: .1875rem;        background: radial-gradient(circle, var(--color-text-muted) 1.5px, transparent 2px) 0 0 / 6px 4px repeat-x;        /* The dots are a gradient, which forced colors would drop: kept out of them, in the system's text color. */        @media (forced-colors: active) {          forced-color-adjust: none;          background: radial-gradient(circle, CanvasText 1.5px, transparent 2px) 0 0 / 6px 4px repeat-x;        }      }    }    .schedule-date-number {      min-width: 2rem;      height: 2rem;      font-size: .8125rem;      /*       * Here the number is the only way into the day, with no events under it: on touch its target reaches 44px       * tall, short of the next week's, and the number keeps its size. It grows up and down only, since on a phone       * seven days leave a column narrower than 44px.       */      @media (pointer: coarse) {        position: relative;        &::after {          @apply --touch-target-block;        }      }    }  }  /* A list of events, in the order they come: a day's in its popover, and each day's in the agenda. */  .schedule-list {    display: flex;    flex-direction: column;    gap: 2px;    min-width: 0;    margin: 0;    padding: 0;    /* In a day's popover the list stands outside the month: its times keep the tabular figures the month sets. */    font-variant-numeric: tabular-nums;    list-style: none;    .schedule-event {      --schedule-lane-height: 1.625rem;    }  }  /*   * Agenda: the period's days that have events, one to a row: the date at the start, its events beside it. In a   * narrow room the date stands over its events.   */  .schedule-agenda {    --schedule-color: var(--color-surface-inverse);    --schedule-surface: var(--surface-color, var(--color-surface-base));    container: schedule-agenda / inline-size;    display: grid;    margin: 0;    padding: 0;    color: var(--color-text-body);    font: 400 .8125rem/1.25rem var(--font-family-sans);    font-feature-settings: inherit;    font-variant-numeric: tabular-nums;    list-style: none;  }  .schedule-agenda-day {    display: grid;    grid-template-columns: 7rem minmax(0, 1fr);    gap: .25rem 1rem;    padding-block: .75rem;    box-shadow: 0 1px 0 var(--color-line-hair);    &:last-child {      box-shadow: none;    }    /* The hairline between days is a shadow, which forced colors drop: a line of the system's gray takes a pixel of the padding. */    @media (forced-colors: active) {      padding-block-end: calc(.75rem - 1px);      border-block-end: 1px solid GrayText;      &:last-child {        padding-block-end: .75rem;        border-block-end: 0;      }    }  }  .schedule-agenda-date {    margin: 0;    padding-block-start: .1875rem;    color: var(--color-text-muted);    font-size: .75rem;    font-weight: var(--font-weight-control);    line-height: 1.25rem;    .schedule-agenda-day[aria-current="date"] & {      color: var(--color-text-strong);    }  }  @container schedule-agenda (width < 28rem) {    .schedule-agenda-day {      grid-template-columns: minmax(0, 1fr);    }  }  /*   * A schedule a reader works: a header of controls over the body the schedule behavior writes. The header keeps   * the period's name between the turns and the switch, and puts the name on a line of its own when the room is narrow.   */  .schedule-view {    container: schedule-view / inline-size;    display: grid;    grid-template-columns: minmax(0, 1fr);    gap: 1rem;    min-width: 0;  }  .schedule-view-header {    display: flex;    flex-wrap: wrap;    align-items: center;    gap: .5rem .75rem;    min-width: 0;  }  /* The period on show: "November 2026". Announced when it changes. */  .schedule-view-title {    flex: 1 1 auto;    min-width: 0;    margin: 0;    color: var(--color-text-strong);    font: var(--font-weight-control) 1rem/1.5rem var(--font-family-sans);    font-feature-settings: inherit;    font-variant-numeric: tabular-nums;    text-wrap: balance;    overflow-wrap: anywhere;  }  .schedule-view-switch, .schedule-view-today, .schedule-view-previous, .schedule-view-next {    flex: none;  }  /* Back and on point the way the days run: where they run from the right, the square turns round. */  .schedule-view-previous, .schedule-view-next {    &:dir(rtl) {      scale: -1 1;    }  }  @container schedule-view (width < 34rem) {    .schedule-view-title {      flex-basis: 100%;      order: -1;    }    .schedule-view-switch {      margin-inline-start: auto;    }  }  /* The body the behavior writes; it takes the room the header leaves and keeps the schedule's own scrolling. */  .schedule-view-body {    min-width: 0;    &:focus-visible {      @apply --focus-ring;      @media (forced-colors: active) {        outline-color: Highlight;      }    }  }}