Event Calendar
Month and week calendars that show events, with drag to move and a day panel for busy time and free gaps.
Calendar is a date picker; these show a schedule. They own no data: you pass events and the view reports what the person did (a click, a drag) through callbacks, so it works with any backend. Events are coloured from the chart tokens, which follow light and dark. For finished screens see the Calendar blocks.
An event
Plain data. meta carries anything of yours (a calendar id, your row).
Month
Chips for timed events, bars across the days for all-day and multi-day ones, “N more” when a day is full, a lit day. Drag a chip or a bar to another day; with a keyboard, focus it and press Alt + an arrow.
November 2026
Week
A time grid: events as tall as they are long, overlapping ones side by side, all-day events in a lane under the day heads, and a line for the current time. Drag an event to another day or time (it snaps to 15 minutes), or move it with Alt + arrows.
November 2026
Day panel
Put it beside either view. It says how many events there are and how much of the working day is booked and free, draws the day as a strip, lists the schedule, and offers each free gap as a Block focus time button.
Thursday, November 12Today
7 events · 4h 30m booked · 4h 30m free
All day
Schedule
- Free 9:30 AM to 10:00 AM 30m
- Free 10:45 AM to 11:30 AM 45m
- Free 1:30 PM to 2:00 PM 30m
- Free 3:00 PM to 4:30 PM 1h 30m
- Free 5:00 PM to 6:00 PM 1h
Calendar Event
The event as the views draw it, in three shapes. Use it to build your own agenda or list.
Accessibility
- Every event is a button whose label carries its title, time and place. The week and month grids have their own labels; today is marked.
- Moving an event never needs a pointer: focus it and press Alt + an arrow. The same callback fires as for a drag.
- Colour is never the only signal: an event always has its title, and the day panel lists the time and place as text.
- A week grid you drag on takes over touch on the events themselves (
touch-action: none), so give people the keyboard or your own card as another way to move them.
MonthCalendar props
| Prop | Type | Default | Description |
|---|---|---|---|
| events | CalendarEventData[] | The events. You own them; the view reports changes. | |
| date / defaultDate / onDateChange | Date | The month shown (any date in it). The header has previous, next and Today. | |
| selectedDate / onSelectedDateChange | Date | null | The lit day, for a day panel beside the grid. | |
| weekStartsOn | 0 | 1 | … | 6 | 1 | 0 = Sunday, 1 = Monday. |
| maxRows | number | 4 | Rows of events a cell holds before it says "N more". |
| onEventClick | (event, el) => void | An event was pressed. el is its element, to place a card beside it. | |
| onEventMove | (event, { start, end }) => void | An event was dragged to another day, or moved with Alt + arrows (a day left and right, a week up and down). | |
| onMoreClick | (date, el) => void | "N more" was pressed (and its button, to place a card beside it). | |
| activeEventId | string | null | The event whose card is open: it stays lit. | |
| today / hideHeader | Date / boolean | Today for the highlight (default: now). Hide the header to draw your own. |
WeekCalendar props
| Prop | Type | Default | Description |
|---|---|---|---|
| events | CalendarEventData[] | The events. All-day and multi-day events go in the lane under the day heads. | |
| date / defaultDate / onDateChange | Date | Any date in the week shown. | |
| days | 5 | 7 | 7 | A work week shows the first five days. |
| weekStartsOn | 0 | 1 | … | 6 | 1 | 0 = Sunday, 1 = Monday. |
| hourHeight / scrollToHour / height | number | 48 / 8 / 640 | Pixels per hour, the hour the grid opens at, and the height of the scrolling grid. |
| snapMinutes | number | 15 | A drag, and Alt + up or down, move by this many minutes. |
| onEventClick / onEventMove | callbacks | As in the month view. A drag moves across days and times; touch drags work too. | |
| onSlotClick | (start) => void | An empty slot was pressed: the time under the pointer, snapped. | |
| now / activeEventId | Date / string | null | The current time, for the line and Today (default: the real time, and it moves). The event whose card is open. |
DayPanel props
| Prop | Type | Default | Description |
|---|---|---|---|
| date / events | Date / CalendarEventData[] | The day and the events (it picks those on that day). | |
| workHours | [start, end] | [9, 18] | The working day, in hours: booked and free time are counted inside it. |
| minGap | number | 30 | The smallest free gap offered, in minutes. |
| onEventClick / onBlockFocus / onCreate | callbacks | An event was pressed; Block focus time was pressed on a gap (start, end); New event was pressed. |