Skip to main content

AgendaCalendar

Every example on this page is live, drawn by the library's Storybook, where you can also change its props and see the result.

A multi-day agenda view showing event cards in vertical columns, under each day's weekday, date and month. Today's date is in a solid circle. Each event is a solid card with its name in bold, its time beneath, the start of its details and the calendar it comes from, so events stay distinct from across a room. Card height is driven by text content rather than event duration, making it ideal for displaying rich event details without the empty gaps of an hourly grid.

The type grows with the columns, names that are too long end in "…", and each column shows as many cards as fit, with a "+N more" line for the rest.

Import​

import { AgendaCalendar } from "~lib/calendar/agenda-calendar";

Props​

NameTypeRequiredDefaultDescription
eventsCalendarEvent[]YesN/AEvents to display
startDateDateYesN/AFirst day of the agenda
daysnumberNo3Number of day columns to show
widthnumber | stringNo300Container width
heightnumber | stringNo300Container height
size"auto" | "sm" | "md" | "lg"No"auto"Text size; "auto" grows it with the width of the columns
timeZonestringNoThe device's zoneTime zone to read days and times in, such as "Europe/London"
timeFormat"24h" | "12h"No"24h"Draw times on a 24-hour or a 12-hour clock

CalendarEvent​

An all-day event's start and end are days, with end the day after the last one, the way calendar feeds write them. Make them from the dates as written, such as new Date("2026-10-05"), so they name the same days in every time zone.

To show a calendar someone has published as a link (the .ics or webcal:// kind), read it with useCalendarFeed, which gives events in this shape.

NameTypeRequiredDescription
namestringYesEvent title
startDateYesStart time
endDateYesEnd time
idstringNoUnique identifier
descriptionstringNoEvent description (ends in "…" after a few lines)
locationstringNoWhere it happens, printed ahead of the description
allDaybooleanNoTakes whole days; shown as "All day"
calendarstringNoThe calendar it comes from, printed on its card
participantsPerson[]NoEvent participants
shadingPatternTypeNoFill pattern (solid, diagonal, dots, crosshatch)

Examples​

Default​

Open Default in Storybook

Small Square​

In a small box the text steps down a size, and names too long for their column end in "…".

Open Small Square in Storybook

Wide Panel​

In a wide box the text steps up a size.

Open Wide Panel in Storybook

More Than Fit​

Each column shows as many cards as fit its height, then a line counting the rest.

Open More Than Fit in Storybook

All-Day Events​

Open All Day Events in Storybook

12-Hour Clock​

Open Twelve Hour Clock in Storybook

Another Time Zone​

Days and times are read in the device's time zone. Pass timeZone to show them somewhere else.

Open Other Time Zone in Storybook

Seven Days​

A full-week agenda view with 7 columns.

Open Seven Days in Storybook

With Descriptions​

An event's description and participants wrap and end in "…" after a few lines.

Open With Descriptions in Storybook

Multi-Day Event​

An event that spans several days shows in each day's column: "From" the time it starts on its first day, "All day" on the days it runs through, and "Until" the time it ends on its last day.

Open Multi Day Event in Storybook

Asymmetric Columns​

Each column is only as long as its events.

Open Asymmetric Columns in Storybook

Overnight Event​

Open Overnight Event in Storybook

Single Day​

Open Single Day in Storybook

Empty​

Open Empty in Storybook

With height="auto" the agenda is only as tall as its content, and with nothing on its days it keeps one line under the headings for "No events". That lets you wrap it in a Brim without checking for an empty week first.

Open Empty At Content Height in Storybook

See Also​