Schedule
Events placed in time: a day or a week as hours down a rail, a month as weeks of lanes, or an agenda.
On this page
A schedule shows a day as hours down a rail, each event as tall as it lasts: a calendar's day view, the rooms of a conference, a clinic's appointments. The events are an ordered list, and each says its title and its time in words; the stylesheet places them on a scale of hours with a hairline at every hour and a label on each. Events that overlap stand side by side. There is no script and nothing is measured.
What lasts whole days stands in a band over the hours. A month shows each day's events in lanes, and an agenda lists them by day. A schedule view is the schedule a reader works, by the day, the week, the month or as an agenda, driven by the schedule behavior.
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>#How an event gets its place
The hours run from --schedule-from to --schedule-to, set on the schedule, and each hour is --schedule-hour tall, 48px unless you say otherwise. Each schedule-event sets --start and --end in hours of the same clock, so half past ten is 10.5 and a quarter to two in the afternoon is 13.75. The event begins and ends at those hours, a pixel clear of the hairline over it and the one under it, so two events that meet keep a line between them.
schedule-rail holds one label for each hour from --schedule-from to --schedule-to, the last one included, and stands each on the middle of its hairline. Write the labels the way your readers tell time; the rail is 48px wide (--schedule-rail).
A whole day at 48px an hour is over 1,100 pixels tall. Show the hours that matter, or put the schedule in a scroll area and let it scroll.
#Events that overlap
Events that share time share the width. Give each of them --lanes, how many stand side by side there, and --lane, its place among them from 0 at the start. Above, the design review and the interview are two lanes of one stretch. Working out the lanes is a question of the data, not the drawing: whatever renders the list decides them, and the stylesheet only places.
#Short events
An event is a size container, so it reads its own height and its words follow:
- From an hour at the default size, the title stands over the time.
- Shorter, the title and the time share one line, centered in the event, and the time is left out of sight when the two do not fit.
- With no room for a line, as for a quarter of an hour at the default size, the event is its tinted sheet alone. Its words stay in the list for assistive technology, and its place on the rail says when it is.
#Now and the current event
schedule-now on the schedule draws an ink line at --now, in hours like the events, with a dot where it meets the start of the day. The line passes under the events, so it never strikes through their words.
The event marked aria-current="true" is an ink sheet: the one in progress, or the one open beside the schedule.
#Several days
For a few days side by side, put each day's schedule-events in a schedule-day with a schedule-heading over it. The days share the width and the rail, and their headings and hours line up across them. Mark today's column aria-current="date": its heading takes the strong ink, and the line of now runs through it with its dot, and through the other days as a hairline.
Several days
<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>Three to five days read well in a card; a week wants the width of a page. In a narrow column each day keeps its share and titles end in an ellipsis.
#Events that open something
When an event opens its details, put schedule-event on a link or a button inside the list item instead of on the item. It is placed the same way, takes a step firmer tint under the pointer and draws the focus ring for the keyboard.
<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>#Whole days
An event that lasts a day or more stands in schedule-allday, a band under the headings and over the hours, with its name, such as "All day", in the rail's column. Each event in it is a schedule-event-lane: it covers --span days from day --column, on lane --lane. The band runs across the days, so each schedule-day names its column with --column and the schedule says how many there are in --schedule-days.
Whole 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>A piece of an event that began before what is shown is schedule-event-continued, and one that goes on after it is schedule-event-continues: in a lane its start or its end is square and runs to the edge, and on the hours, past midnight, its top or its bottom. A piece that is not the start has no bar.
#Category
schedule-event-category colors an event with the category set on it or around it: its sheet takes the category's surface, its bar the category's mark and its words the category's text. A calendar of several teams or projects tells them apart this way; the title still says what the event is.
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>#A month
schedule-month is a month as weeks of seven days. Each schedule-week writes a day, then the events that start on it, then its more button, so a screen reader meets them in the order of the days; the stylesheet places each in its column and lane. The day's number, schedule-date-number, is a round button that opens the day, ink for today. A day shows --lanes events, three by default, and a schedule-more button for the rest, which opens a popover that lists them. A short event in a month is plain, schedule-event-plain: a dot, its time and its title, without a sheet.
In a room narrower than 36rem the lanes give way: each day shows a dot for each of its events, three at most, under its number, which opens the day. Nothing is squeezed into seven narrow columns of text.
schedule-agenda lists the same events by day, the date at the start of each row and its events in a schedule-list beside it, or over them in a narrow room. It suits a phone, a printout and a reader who would rather read than look.
The month and the agenda are written from the events, so they come from the behavior or a framework component, as in the view below.
#A schedule to work
A schedule-view puts a header of controls over a body the schedule behavior writes: today, previous and next, the period's name and a switch between day, week, month and agenda. Previous and next move by the view's period, a day's number opens that day, and the period's name is announced when it changes. On a narrow room the name takes a line of its own.
A schedule to work
<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>#The events
Each event has a stable id, a title, a start and an end. An all-day event has allDay: true and days for its ends, YYYY-MM-DD; another has local times, YYYY-MM-DDTHH:mm. The end is exclusive: an all-day event on the 13th alone ends on the 14th, and an event that ends at midnight ends with the day before. category names a palette, such as blue for category-blue, and href makes the event a link; without one it is a button whose value is its id, which the page listens to.
Times are already in the zone the schedule is shown in, and a repeating event arrives as its occurrences: time zones and repeats are the application's to resolve. Days are counted with the calendar, kept at noon, so a daylight-saving change never moves an all-day event to the day before. The view does not edit, move or store events; it shows them and says which one was pressed.
#The behavior
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' }| Option | Default | |
|---|---|---|
events | [] | The events, as above |
value | today's month | The day and the view to show first: { date, view }, the view one of day, week, month or agenda |
today | the browser's | Today, as YYYY-MM-DD; give it when a server renders the schedule, so both sides agree |
locale | the page's lang | A BCP 47 tag for the names of days and months |
weekStart | the locale's | The first day of a week, 0 for Sunday to 6 for Saturday |
lanes | 3 | How many events a day of a month shows before the rest go behind its more button |
from, to | 8, 18 | The hours a day or a week shows at least; they reach further for an earlier or a later event |
messages | English | The band's name, the more button's words and name, and the empty agenda's sentence |
draw | none | Takes over writing the title and the body, for a renderer that writes them itself |
The reader's moves dispatch input and change from the root; the function it returns has a value to read and to set, and setting it dispatches nothing. scheduleLayout(value, options) returns what a view shows as data, the weeks with each event's lane, the hours with each event's place, the band and the agenda's days, so a server, a framework and the behavior lay out the same events the same way.
#Schedule, gantt or calendar
A schedule is for events placed in time: the hours of a day read down, or the days of a month. Spans of a plan on one shared scale, one row to each thing, are a gantt. A month to pick a day from, or a range of days, is a calendar, and moments in the order they happened are a timeline.
#Accessibility
- Write the events as an
<ol>in order of time, and name it: witharia-labelfor one day, or with the day's heading througharia-labelledbyon itsschedule-day. - Each event says its title and its time in words, with
<time datetime>for the hours, so it reads "Design review, 10:00 to 11:30" without the drawing. The rail is a picture of the same scale: hide it witharia-hidden="true". - The current event and today are marked with
aria-current, which a screen reader announces. The line of now is drawn by the stylesheet; say the time in words where it matters. - In forced colors each event is outlined, the current one is filled with the highlight color, and the hairlines and the line of now keep the system's colors.
- A month is not a date grid: its days are numbers that open a day and its events are links or buttons, each named with its title and when it is. A more button says how many events it lists and on which day. A category's color is never the only way an event is told apart.
- The view's controls keep focus as they move; a day's number, which leaves with the month, hands focus to the name of the day it opened.
- Name the time zone the hours are in near the title, such as "Times in Taipei (GMT+8)", wherever a reader may be in another zone: the rail and the events say only the time on the clock.
#React, Svelte and Vue
The schedule component writes the period from scheduleLayout(), so the first HTML a server sends holds it, and attaches the behavior, which answers the header and the day numbers. Its value is { date, view }, and pressing an event without an href is heard as onEventClick, or eventClick in Vue. Give today and locale when it is rendered on a server. Copy it into the project with npx master-ui add schedule; React, Svelte and Vue says how the components are built and used.
#Classes
| Class | Description |
|---|---|
schedule | The hours from --schedule-from to --schedule-to, each --schedule-hour tall: a rail of labels at the start, then one column for each day |
schedule-now | Draws an ink line with a dot at --now through the day marked aria-current="date", or through every day when none is, and a hairline through the other daysApply with schedule |
schedule-rail | The labels of the hours, one item to an hour from --schedule-from to --schedule-to, each centered on its hairline. Hide it with aria-hidden: the events say their times in words |
schedule-day | One day's column, for several days side by side: an optional schedule-heading over its schedule-events. Mark today with aria-current="date". A schedule of one day may leave it out |
schedule-heading | The name of a day, over its column, in muted ink; today's takes the strong ink |
schedule-events | The events of one day, in order of time, on the scale's hairlines: one at every hour and one down the day's start |
schedule-event | One event from --start to --end, in lane --lane of --lanes: a quiet sheet of tinted ink with a rounded ink bar inside its start, a pixel clear of the hairlines. Put it on the list item, or on a link or a button inside one. A short event keeps one line |
schedule-title | What the event is: one line that ends in an ellipsis. It stands in an event wherever the event is: on the hours, in a month, a list or an agenda |
schedule-time | When it is, written with <time> elements: a quiet line under the title, or beside it in a short event when both fit. It stands in an event wherever the event is: on the hours, in a month, a list or an agenda |
schedule-event-lane | In a lane instead of on the hours: --span days from day --column, on lane --lane, one line high. For an all-day band, a month and a list of eventsApply with schedule-event |
schedule-event-continued | A piece of an event that began before: on the hours its top is square, in a lane its start, and it has no barApply with schedule-event |
schedule-event-continues | A piece of an event that goes on after: on the hours its bottom is square, in a lane its endApply with schedule-event |
schedule-event-plain | A short event in a month or a list: no sheet, a dot for the bar, then its time and its titleApply with schedule-event |
schedule-event-category | The sheet, bar and words of the category set by a category-<name> class on it or around itApply with schedule-event |
schedule-allday | The band under the headings for what lasts whole days, across the day columns: each day names its column with --column and the schedule says how many in --schedule-days. Holds a schedule-allday-label and lane events |
schedule-allday-label | The band's name in the rail's column, such as "All day"; aria-hidden, with the band named by its aria-label |
schedule-month | A month: schedule-weekdays over schedule-weeks. In a narrow room each day shows a dot for each of its events instead of lanes |
schedule-weekdays | The names of the weekdays over the weeks; aria-hidden, since each day's number is named in full |
schedule-weekday | One weekday's name |
schedule-weeks | The weeks, in order |
schedule-week | A week: seven days, the numbers on the first row, --lanes rows of events and a row for the more buttons. Write each day, then the events that start on it, then its more button, so they read in the order of the days |
schedule-date | A day: a cell from the top to the bottom of the week in column --column, with --count its number of events. Mark today with aria-current="date" |
schedule-date-outside | A day of the month before or after: a quieter number on a faint trayApply with schedule-date |
schedule-date-number | The day's number, a round button that opens the day; its accessible name is the whole date and its count of events. Today's is ink |
schedule-more | The rest of a day's events past its lanes, on the week's last row in column --column: opens a popover that lists the day's events. Its accessible name says how many and which day |
schedule-list | Events in the order they come, as lane events one above the other: a day's in its popover, each day's in the agenda |
schedule-agenda | The period's days that have events, one to a row: the date at the start and a schedule-list beside it, or over it in a narrow room |
schedule-agenda-day | One day of the agenda; mark today with aria-current="date" |
schedule-agenda-date | The day's date, at the start of its row or over a day's list in a popover; today's takes the strong ink |
schedule-view | A schedule the reader works: a schedule-view-header over a schedule-view-body, driven by the schedule behavior |
schedule-view-header | The controls: today, previous and next, the period's name and the view switch, with the name on a line of its own in a narrow room |
schedule-view-title | The period on show, such as "November 2026"; mark it aria-live="polite" so a move is heard |
schedule-view-previous | Moves back by the view's period |
schedule-view-next | Moves on by the view's period |
schedule-view-today | Moves to the period that holds today |
schedule-view-switch | Holds the radios that choose the view, with the values day, week, month and agenda; a segmented control |
schedule-view-body | Where the behavior writes the period: a schedule for a day or a week, a schedule-month or a schedule-agenda |
#Custom properties
| Property | Default | Description |
|---|---|---|
--schedule-from | 8 | The first hour, from 0 to 24; fractions work |
--schedule-to | 18 | The hour the schedule ends |
--schedule-hour | 3rem | The height of an hour |
--schedule-rail | 3rem | The width of the rail of labels |
--schedule-color | var(--color-surface-inverse) | The ink the events are tinted and edged with |
--now | The hour of the line of schedule-now, such as 13.5 for half past oneSet on schedule | |
--start | The hour the event beginsSet on schedule-event | |
--end | The hour the event endsSet on schedule-event | |
--lane | Where the event stands among events that overlap it, from 0 at the start; 0 by defaultSet on schedule-event | |
--lanes | How many events stand side by side where this one does; 1 by defaultSet on schedule-event | |
--schedule-days | How many day columns stand side by side, for a schedule with an all-day band; 1 by defaultSet on schedule | |
--column | In a lane, the day the event starts on in its row, from 1; on a schedule-day, schedule-date or schedule-more, its columnSet on schedule-event | |
--span | In a lane, how many days the event covers in its row; 1 by defaultSet on schedule-event | |
--lanes | How many lanes of events a week shows; 3 by defaultSet on schedule-week | |
--count | 0 | How many events the day holds, drawn as up to three dots in a narrow monthSet on schedule-date |