Skip to content
nexubDesign System
v11.9.0

Components · Data Display

Event Calendar

BetaAdded v6.2.0

A month or week grid of events. Display only: your app owns the events and what a click does.

import { EventCalendar } from '@nexub/react';
View as Markdown

Playground

Props

November 2026

November 2026
SunMonTueWedThuFriSat

                                                                TSX
                                                                <EventCalendar events={events} onEventClick={(e) => setPicked(e.title)} onDayClick={(d) => setPicked(d.toDateString())} />

                                                                Examples

                                                                Team calendar

                                                                November 2026

                                                                November 2026
                                                                SunMonTueWedThuFriSat

                                                                                                                              Day and agenda views

                                                                                                                              `views` adds Day (an hour grid with a "now" line) and Agenda (the month as a list) to the switcher.

                                                                                                                              Monday, November 16, 2026

                                                                                                                              • Offsite
                                                                                                                              • 9:30 AM – 10:00 AMStandup
                                                                                                                              • 9:30 AM – 11:00 AMDesign review
                                                                                                                              • 2:00 PM – 3:30 PMLaunch

                                                                                                                              Move, add and act on events

                                                                                                                              Drag an event, or press Alt+Arrow on it, to move it; a "+" per day, a menu per event and a legend.

                                                                                                                              November 2026

                                                                                                                              • Meetings
                                                                                                                              • Away
                                                                                                                              • Deadlines
                                                                                                                              • Payroll (fixed)
                                                                                                                              November 2026
                                                                                                                              SunMonTueWedThuFriSat
                                                                                                                                                                      • Payroll

                                                                                                                                                                                          States

                                                                                                                                                                                          • November 2026

                                                                                                                                                                                            November 2026
                                                                                                                                                                                            SunMonTueWedThuFriSat

                                                                                                                                                                                                                                                          default
                                                                                                                                                                                                                                                        • November 2026

                                                                                                                                                                                                                                                          November 2026
                                                                                                                                                                                                                                                          SunMonTueWedThuFriSat

                                                                                                                                                                                                                                                                                                                                loading

                                                                                                                                                                                                                                                                                                                              Props

                                                                                                                                                                                                                                                                                                                              Props
                                                                                                                                                                                                                                                                                                                              PropTypeDefaultDescription
                                                                                                                                                                                                                                                                                                                              eventsrequiredCalendarEvent[]—{ id, title, start, end?, allDay?, tone? }. Events spanning days show on each day; tone is primary, success, warning, error or info.
                                                                                                                                                                                                                                                                                                                              dateDate—Any day in the shown month or week; Today and the arrows change it.
                                                                                                                                                                                                                                                                                                                              defaultDateDate—Any day in the shown month or week; Today and the arrows change it.
                                                                                                                                                                                                                                                                                                                              onDateChange((date: Date) => void)—Any day in the shown month or week; Today and the arrows change it.
                                                                                                                                                                                                                                                                                                                              view'month' | 'week' | 'day' | 'agenda'—Week shows every event; month shows maxEventsPerDay then "N more".
                                                                                                                                                                                                                                                                                                                              defaultView'month' | 'week' | 'day' | 'agenda''month'Week shows every event; month shows maxEventsPerDay then "N more".
                                                                                                                                                                                                                                                                                                                              onViewChange((view: EventCalendarView) => void)—Week shows every event; month shows maxEventsPerDay then "N more".
                                                                                                                                                                                                                                                                                                                              onEventClick((event: CalendarEvent) => void)—Makes events buttons.
                                                                                                                                                                                                                                                                                                                              onDayClick((date: Date) => void)—Makes day numbers and "N more" buttons, for example to open the day.
                                                                                                                                                                                                                                                                                                                              maxEventsPerDaynumber3Month view only.
                                                                                                                                                                                                                                                                                                                              weekStartsOn0 | 1 | 2 | 3 | 4 | 5 | 6—Defaults to the locale’s first day (Monday for en-GB, Sunday for en-US).
                                                                                                                                                                                                                                                                                                                              onEventMove((event: CalendarEvent, range: { start: Date; end?: Date; }) => void)—11.4. Makes events movable: drag one to another day (month, week) or time (day view, 15-minute steps), or press Alt+Arrow on it, pick with the arrows and press Enter (Escape cancels). The duration is kept. Events with editable: false stay put.
                                                                                                                                                                                                                                                                                                                              renderDayAction((date: Date) => React.ReactNode)—11.4. A per-day slot, e.g. a small add button: in each day’s header (month, week), above the day view and beside each agenda day.
                                                                                                                                                                                                                                                                                                                              eventActions((event: CalendarEvent) => React.ReactNode)—11.4. Controls for one event, e.g. a menu: beside it in day and agenda views, over its end on hover or focus in month and week cells (always shown on touch screens).
                                                                                                                                                                                                                                                                                                                              legendEventCalendarLegendItem[]—11.4. A row under the toolbar naming what each tone means. Colour is never the only signal: titles still say what an event is.
                                                                                                                                                                                                                                                                                                                              classNamestring—
                                                                                                                                                                                                                                                                                                                              emptyStateReact.ReactNode—Shown under the grid when no event falls in the visible range (the month, week or day; agenda covers the month). The grid stays, and an empty range is normal, so there is no default.
                                                                                                                                                                                                                                                                                                                              errorStateReact.ReactNode—Shown in place of the data when a load failed, for example an ErrorState with a retry action. Wins over loading and empty.
                                                                                                                                                                                                                                                                                                                              loadingboolean—Shows a skeleton in place of the data and sets aria-busy.
                                                                                                                                                                                                                                                                                                                              nowDatenew Date()The current time: marks today and draws the "now" line in day view. Pass a fixed date in tests and screenshots.
                                                                                                                                                                                                                                                                                                                              viewsEventCalendarView[]['month', 'week']Views offered in the switcher. 'day' (an hour grid for one day) and 'agenda' (the month's events as a list) are opt-in; the current view is always offered.

                                                                                                                                                                                                                                                                                                                              Accessibility

                                                                                                                                                                                                                                                                                                                              Keyboard

                                                                                                                                                                                                                                                                                                                              • Alt + Arrow keys

                                                                                                                                                                                                                                                                                                                                With `onEventMove`, on an event: starts a move and takes the first step.

                                                                                                                                                                                                                                                                                                                              • Arrow keys

                                                                                                                                                                                                                                                                                                                                While moving: left and right a day; up and down a week, or 15 minutes in day view.

                                                                                                                                                                                                                                                                                                                              • Enter / Escape

                                                                                                                                                                                                                                                                                                                                Drops the event there, or cancels the move.

                                                                                                                                                                                                                                                                                                                              Notes

                                                                                                                                                                                                                                                                                                                              • A table with weekday column headers; today has `aria-current="date"` and each day reads its full date.

                                                                                                                                                                                                                                                                                                                              • The title is a polite live region, so Today and the arrows announce the new month or week.

                                                                                                                                                                                                                                                                                                                              • Movable events describe the keyboard move (Alt+Arrow, then arrows, Enter or Escape); each step and the drop are announced in a polite live region.

                                                                                                                                                                                                                                                                                                                              On iOS & Android