Skip to content

Calendar

Pro

An event calendar with month, week, day, agenda, resource schedule and timeline views, in any time zone. Not an M3 component (@windmorph/react-pro).

import { Calendar, CalendarToolbar, CalendarMonthView, CalendarTimeGridView, CalendarAgendaView, CalendarTimelineView, CalendarEvent, useCalendarState } from '@windmorph/react-pro/calendar';

Part of Windmorph Pro, paid components on the free core, not on sale yet. See the Pro guide for what it includes and to register interest.

Props

By name or description, across the 103 props below

Calendar 45 props

  • eventstype readonly CalendarEventInput<Data>[]Required

    The events: pass each occurrence, since recurrence is the app's.

  • toolbartype ReactNode | ((calendar: CalendarController<Data>) => ReactNode)

    Replaces the toolbar, or removes it with false.

  • loadingtype booleandefault false

    Shows a progress bar over the calendar.

  • emptytype ReactNode

    Shown in the agenda when the period has no events.

  • densitytype 0 | -1 | -2 | -3default the theme's

    The calendar's own density.

  • reftype Ref<HTMLDivElement>

    Ref to the outermost element.

  • idtype string

    The outermost element's id.

  • resourcestype readonly CalendarResource[]

    The resources for the schedule and timeline views.

  • viewtype "month" | "week" | "day" | "agenda" | "resource-schedule" | "resource-timeline"

    The view (controlled). One of views; any other shows the last view offered.

  • defaultViewtype "month" | "week" | "day" | "agenda" | "resource-schedule" | "resource-timeline"default "month"

    The view at first.

  • datetype CalendarDayInput

    The date shown (controlled).

  • defaultDatetype CalendarDayInputdefault the day of now, or today

    The date at first.

  • viewstype readonly CalendarView[]default month, week, day and agenda

    The views offered; the resource views are used only when listed.

  • timeZonetype stringdefault the browser's, after hydration

    The display zone. Required for server rendering.

  • nowtype CalendarInstantInput

    The moment "today" is worked out from at first, so the server and browser agree.

  • firstDayOfWeektype "sun" | "mon" | "tue" | "wed" | "thu" | "fri" | "sat"default the locale's

    The week's first day.

  • calendartype string

    A non-Gregorian calendar to display, as buddhist or persian.

  • slotDurationtype numberdefault 30

    A slot's length in minutes.

  • visibleHourstype readonly [number, number]default [0, 24]

    The hours shown in the time views.

  • businessHourstype readonly CalendarBusinessHours[]

    The open hours, shaded in the time views.

  • blockedRangestype readonly CalendarBlockedRange[]

    Spans shown as blocked, with a pattern as well as a tint.

  • timelineUnittype "week" | "day" | "hour"default "hour"

    What a timeline column covers.

  • scheduleDaystype numberdefault 1

    How many days the resource schedule shows.

  • agendaDaystype numberdefault 30

    How many days the agenda shows.

  • maxEventsPerDaytype numberdefault 3

    How many bars a month cell shows before "+N more".

  • iconstype Partial<CalendarIcons>

    Replaces icons.

  • renderEventtype ((event: CalendarEntry<Data>) => ReactNode)

    Replaces an event’s content.

  • renderDayHeadertype ((day: CalendarDate) => ReactNode)

    Replaces a day’s header.

  • renderCelltype ((cell: CalendarCellInfo) => ReactNode)

    Adds content to a cell.

  • renderResourcetype ((resource: CalendarResource) => ReactNode)

    Replaces a resource’s name.

Events

  • onViewChangetype ((view: CalendarView) => void)

    Called when the view changes.

  • onDateChangetype ((date: CalendarDate) => void)

    Called when the date changes.

  • onSelectRangetype ((range: CalendarRange) => CalendarChangeAnswer<CalendarRange>)

    A range was chosen. May return false, an adjusted range, or a promise of either.

  • onEventMovetype ((change: CalendarEventChange<Data>) => CalendarChangeAnswer<CalendarEventChange<Data>>)

    An event moved. May return false, an adjusted change, or a promise of either.

  • onEventResizetype ((change: CalendarEventChange<Data>) => CalendarChangeAnswer<CalendarEventChange<Data>>)

    An event's length changed. May return false, an adjusted change, or a promise of either.

  • onEventActiontype ((event: CalendarEventInput<Data>) => void)

    An event was activated.

  • onMoreEventstype ((day: CalendarDate) => void)default opens that day

    "+N more" was pressed.

Text

  • labelstype Partial<CalendarLabels>

    Words it shows or announces. A LabelsProvider sets them for the whole app.

  • aria-labeltype string

    One of aria-label or aria-labelledby is required.

  • aria-labelledbytype string

    One of aria-label or aria-labelledby is required.

  • aria-describedbytype string

    The id of an element that describes it.

  • aria-detailstype string

    The id of an element with more detail about it.

Also accepts the root element's HTML attributes (id, data-*, event handlers).

CalendarToolbar 7 props

  • calendartype CalendarController<Data>Required

    What useCalendarState returned.

  • viewstype readonly CalendarView[]default the calendar's

    The views offered.

  • reftype Ref<HTMLDivElement>

    Ref to the toolbar.

  • idtype string

    The toolbar's id.

CalendarMonthView 10 props

  • calendartype CalendarController<Data>Required

    What useCalendarState returned.

  • reftype Ref<HTMLDivElement>

    Ref to the view's outermost element.

  • idtype string

    The view's outermost element's id.

Text

  • aria-labeltype string

    One of aria-label or aria-labelledby is required.

  • aria-labelledbytype string

    One of aria-label or aria-labelledby is required.

  • aria-describedbytype string

    The id of an element that describes it.

  • aria-detailstype string

    The id of an element with more detail about it.

CalendarTimeGridView 10 props

  • calendartype CalendarController<Data>Required

    What useCalendarState returned.

  • reftype Ref<HTMLDivElement>

    Ref to the view's outermost element.

  • idtype string

    The view's outermost element's id.

Text

  • aria-labeltype string

    One of aria-label or aria-labelledby is required.

  • aria-labelledbytype string

    One of aria-label or aria-labelledby is required.

  • aria-describedbytype string

    The id of an element that describes it.

  • aria-detailstype string

    The id of an element with more detail about it.

CalendarAgendaView 11 props

  • calendartype CalendarController<Data>Required

    What useCalendarState returned.

  • reftype Ref<HTMLDivElement>

    Ref to the view's outermost element.

  • idtype string

    The view's outermost element's id.

  • emptytype ReactNodedefault an EmptyState with labels.empty

    Shown when the period has no events.

Text

  • aria-labeltype string

    One of aria-label or aria-labelledby is required.

  • aria-labelledbytype string

    One of aria-label or aria-labelledby is required.

  • aria-describedbytype string

    The id of an element that describes it.

  • aria-detailstype string

    The id of an element with more detail about it.

CalendarTimelineView 10 props

  • calendartype CalendarController<Data>Required

    What useCalendarState returned.

  • reftype Ref<HTMLDivElement>

    Ref to the view's outermost element.

  • idtype string

    The view's outermost element's id.

Text

  • aria-labeltype string

    One of aria-label or aria-labelledby is required.

  • aria-labelledbytype string

    One of aria-label or aria-labelledby is required.

  • aria-describedbytype string

    The id of an element that describes it.

  • aria-detailstype string

    The id of an element with more detail about it.

CalendarEvent 10 props

  • calendartype CalendarController<Data>Required

    What useCalendarState returned.

  • entrytype CalendarEntry<Data>Required

    The event to show.

  • bartype booleandefault false

    A one-line bar, as in a month cell.

  • stepMinutestype number

    How long one step of the touch menu moves it, in minutes, or a day when left out.

  • activetype "select" | "move" | "resize"

    The operation under way on it.

  • reftype Ref<HTMLDivElement>

    Ref to the event.

  • idtype string

    The event's element id.

Types

CalendarEventInput 10 fields

An event. Recurrence is the app's: pass each occurrence.

  • idtype stringRequired

    Unique among the events.

  • titletype stringRequired
  • starttype string | Date | ZonedDateTime | CalendarDateRequired

    With allDay, a day; otherwise a moment.

  • endtype string | Date | ZonedDateTime | CalendarDatedefault its start

    With allDay, the last day (inclusive); otherwise a moment.

  • allDaytype booleandefault false

    Whether it covers whole days.

  • resourceIdstype readonly string[]

    The resources it belongs to.

  • colortype CalendarEventColordefault "primary"

    Its semantic role.

  • statustype string

    A word for its state, always shown as text beside any colour.

  • editabletype booleandefault true

    Whether it can be moved and resized.

  • datatype NonNullable<Data>

    The app's own data.

CalendarEntry 12 fields

An event as the calendar reads it: absolute, in the display zone.

  • idtype stringRequired

    The event’s id.

  • titletype stringRequired

    The event’s title.

  • starttype ZonedDateTimeRequired

    When it starts, in the display zone.

  • endtype ZonedDateTimeRequired

    Exclusive.

  • allDaytype booleanRequired

    Whether it covers whole days.

  • firstDaytype CalendarDateRequired

    The first day it touches.

  • lastDaytype CalendarDateRequired

    Inclusive.

  • resourceIdstype readonly string[]Required

    The resources it belongs to.

  • colortype CalendarEventColorRequired

    Its semantic role.

  • statustype string | undefinedRequired

    Its status, in words.

  • editabletype booleanRequired

    Whether it can be moved and resized.

  • sourcetype CalendarEventInput<Data>Required

    The event the app passed.

CalendarResource 2 fields

A resource: a person, room or machine.

  • idtype stringRequired

    Unique among the resources.

  • titletype stringRequired

    Its name.

CalendarBusinessHours 3 fields

Hours open for work. days are 0 (the week's first) to 6, or all when left out.

  • daystype readonly number[]default every day

    0 (the week’s first) to 6.

  • fromtype numberRequired

    First hour, 0 to 24.

  • totype numberRequired

    Last hour, 0 to 24.

CalendarBlockedRange 4 fields

A span of time marked as blocked.

  • starttype CalendarInstantInputRequired

    Where it starts.

  • endtype CalendarInstantInputRequired

    Where it ends.

  • resourceIdstype readonly string[]

    Applies only to these resources; every one when left out.

  • selectabletype booleandefault true

    Whether it can still be chosen or dropped on.

CalendarRange 4 fields

A selected span, as onSelectRange reports it.

  • starttype ZonedDateTimeRequired

    Where it starts.

  • endtype ZonedDateTimeRequired

    Exclusive.

  • allDaytype booleanRequired

    Whether it’s whole days.

  • resourceIdtype string

    The resource it’s for, in a resource view.

CalendarEventChange 5 fields

An event's new place, as onEventMove and onEventResize report it.

  • eventtype CalendarEventInput<Data>Required

    The event the app passed.

  • starttype ZonedDateTimeRequired

    Its new start.

  • endtype ZonedDateTimeRequired

    Exclusive.

  • daystype { first: CalendarDate; last: CalendarDate; }

    For an all-day event, the first and last day.

  • resourceIdstype readonly string[]Required

    Its resources after the change.

CalendarCellInfo 14 fields

One date cell, handed to renderCell.

  • rowtype numberRequired

    Its row.

  • coltype numberRequired

    Its column.

  • starttype ZonedDateTimeRequired

    Where it starts.

  • endtype ZonedDateTimeRequired

    Exclusive.

  • allDaytype booleanRequired

    Whether it’s a whole day.

  • daytype CalendarDateRequired

    Its day.

  • resourceIdtype string | undefinedRequired

    Its resource, in a resource view.

  • nametype stringRequired

    Its accessible name.

  • absenttype booleanRequired

    A wall-clock time this day doesn't have, skipped by a clock change.

  • blockedtype booleanRequired

    Whether a blocked range meets it.

  • selectabletype booleanRequired

    Whether it can be chosen or dropped on.

  • todaytype booleanRequired

    Whether it’s today.

  • outsideMonthtype booleanRequired

    Whether it falls outside the month shown.

  • businesstype booleanRequired

    Whether it’s within open hours.

Hooks

useCalendarState

useCalendarState signature
useCalendarState(options: UseCalendarStateOptions<Data>): { view: CalendarView; setView: (value: React.SetStateAction<CalendarView>, ...args: any[]) => void; views: readonly CalendarView[]; date: CalendarDate; setDate: (next: CalendarDate) => void; previous: () => void; next: () => void; goToToday: () => void; title: string; timeZone: string; locale: string; firstDayOfWeek: FirstDayOfWeek | undefined; calendarId: string | undefined; entries: CalendarEntry<Data>[]; index: Map<string, CalendarEntry<Data>[]>; resources: readonly CalendarResource[]; slotDuration: number; visibleHours: readonly [number, number]; timelineUnit: CalendarTimelineUnit; scheduleDays: number; agendaDays: number; maxEventsPerDay: number; blockedAt: (start: ZonedDateTime, end: ZonedDateTime, resourceId: string | undefined) => { blocked: boolean; selectable: boolean; }; isBusiness: (day: CalendarDate, hour: number) => boolean; now: ZonedDateTime | null; today: CalendarDate | null; formatters: { dayNumber: DateFormatter; weekday: DateFormatter; weekdayDay: DateFormatter; longDay: DateFormatter; time: DateFormatter; dateTime: DateFormatter; month: DateFormatter; shortDay: DateFormatter; range: DateFormatter; }; asDate: (day: CalendarDate) => Date; labels: CalendarLabels & Partial<CalendarLabels>; icons: { previous: React.ReactElement<unknown, string | React.JSXElementConstructor<any>>; next: React.ReactElement<unknown, string | React.JSXElementConstructor<any>>; more: React.ReactElement<unknown, string | React.JSXElementConstructor<any>>; empty: React.ReactElement<unknown, string | React.JSXElementConstructor<any>>; }; announcement: string; announce: React.Dispatch<React.SetStateAction<string>>; onSelectRange: ((range: CalendarRange) => CalendarChangeAnswer<CalendarRange>) | undefined; onEventMove: ((change: CalendarEventChange<Data>) => CalendarChangeAnswer<CalendarEventChange<Data>>) | undefined; onEventResize: ((change: CalendarEventChange<Data>) => CalendarChangeAnswer<CalendarEventChange<Data>>) | undefined; onEventAction: ((event: CalendarEventInput<Data>) => void) | undefined; onMoreEvents: ((day: CalendarDate) => void) | undefined; renderEvent: ((event: CalendarEntry<Data>) => React.ReactNode) | undefined; renderDayHeader: ((day: CalendarDate) => React.ReactNode) | undefined; renderCell: ((cell: CalendarCellInfo) => React.ReactNode) | undefined; renderResource: ((resource: CalendarResource) => React.ReactNode) | undefined; entriesOn: (day: CalendarDate) => readonly CalendarEntry<Data>[]; }

A calendar's state, for composing its views differently from Calendar. Not an M3 component (Windmorph Pro, docs/plans/calendar.md).

  • optionstype UseCalendarStateOptions<Data>Required
  • options.eventstype readonly CalendarEventInput<Data>[]Required

    The events: pass each occurrence, since recurrence is the app's.

  • options.resourcestype readonly CalendarResource[]

    The resources for the schedule and timeline views.

  • options.viewtype CalendarView

    The view (controlled). One of views; any other shows the last view offered.

  • options.defaultViewtype CalendarViewdefault "month"

    The view at first.

  • options.onViewChangetype (view: CalendarView) => void

    Called when the view changes.

  • options.datetype CalendarDayInput

    The date shown (controlled).

  • options.defaultDatetype CalendarDayInputdefault the day of now, or today

    The date at first.

  • options.onDateChangetype (date: CalendarDate) => void

    Called when the date changes.

  • options.viewstype readonly CalendarView[]default month, week, day and agenda

    The views offered; the resource views are used only when listed.

  • options.timeZonetype stringdefault the browser's, after hydration

    The display zone. Required for server rendering.

  • options.nowtype CalendarInstantInput

    The moment "today" is worked out from at first, so the server and browser agree.

  • options.firstDayOfWeektype FirstDayOfWeekdefault the locale's

    The week's first day.

  • options.calendartype string

    A non-Gregorian calendar to display, as buddhist or persian.

  • options.slotDurationtype numberdefault 30

    A slot's length in minutes.

  • options.visibleHourstype readonly [number, number]default [0, 24]

    The hours shown in the time views.

  • options.businessHourstype readonly CalendarBusinessHours[]

    The open hours, shaded in the time views.

  • options.blockedRangestype readonly CalendarBlockedRange[]

    Spans shown as blocked, with a pattern as well as a tint.

  • options.timelineUnittype CalendarTimelineUnitdefault "hour"

    What a timeline column covers.

  • options.scheduleDaystype numberdefault 1

    How many days the resource schedule shows.

  • options.agendaDaystype numberdefault 30

    How many days the agenda shows.

  • options.maxEventsPerDaytype numberdefault 3

    How many bars a month cell shows before "+N more".

  • options.onSelectRangetype (range: CalendarRange) => CalendarChangeAnswer<CalendarRange>

    A range was chosen. May return false, an adjusted range, or a promise of either.

  • options.onEventMovetype (change: CalendarEventChange<Data>) => CalendarChangeAnswer<CalendarEventChange<Data>>

    An event moved. May return false, an adjusted change, or a promise of either.

  • options.onEventResizetype (change: CalendarEventChange<Data>) => CalendarChangeAnswer<CalendarEventChange<Data>>

    An event's length changed. May return false, an adjusted change, or a promise of either.

  • options.onEventActiontype (event: CalendarEventInput<Data>) => void

    An event was activated.

  • options.onMoreEventstype (day: CalendarDate) => voiddefault opens that day

    "+N more" was pressed.

  • options.labelstype Partial<CalendarLabels>

    Words it shows or announces. A LabelsProvider sets them for the whole app.

  • options.iconstype Partial<CalendarIcons>

    Replaces icons.

  • options.renderEventtype (event: CalendarEntry<Data>) => React.ReactNode

    Replaces an event’s content.

  • options.renderDayHeadertype (day: CalendarDate) => React.ReactNode

    Replaces a day’s header.

  • options.renderCelltype (cell: CalendarCellInfo) => React.ReactNode

    Adds content to a cell.

  • options.renderResourcetype (resource: CalendarResource) => React.ReactNode

    Replaces a resource’s name.

Returns { view: CalendarView; setView: (value: React.SetStateAction<CalendarView>, ...args: any[]) => void; views: readonly CalendarView[]; date: CalendarDate; setDate: (next: CalendarDate) => void; previous: () => void; next: () => void; goToToday: () => void; title: string; timeZone: string; locale: string; firstDayOfWeek: FirstDayOfWeek | undefined; calendarId: string | undefined; entries: CalendarEntry<Data>[]; index: Map<string, CalendarEntry<Data>[]>; resources: readonly CalendarResource[]; slotDuration: number; visibleHours: readonly [number, number]; timelineUnit: CalendarTimelineUnit; scheduleDays: number; agendaDays: number; maxEventsPerDay: number; blockedAt: (start: ZonedDateTime, end: ZonedDateTime, resourceId: string | undefined) => { blocked: boolean; selectable: boolean; }; isBusiness: (day: CalendarDate, hour: number) => boolean; now: ZonedDateTime | null; today: CalendarDate | null; formatters: { dayNumber: DateFormatter; weekday: DateFormatter; weekdayDay: DateFormatter; longDay: DateFormatter; time: DateFormatter; dateTime: DateFormatter; month: DateFormatter; shortDay: DateFormatter; range: DateFormatter; }; asDate: (day: CalendarDate) => Date; labels: CalendarLabels & Partial<CalendarLabels>; icons: { previous: React.ReactElement<unknown, string | React.JSXElementConstructor<any>>; next: React.ReactElement<unknown, string | React.JSXElementConstructor<any>>; more: React.ReactElement<unknown, string | React.JSXElementConstructor<any>>; empty: React.ReactElement<unknown, string | React.JSXElementConstructor<any>>; }; announcement: string; announce: React.Dispatch<React.SetStateAction<string>>; onSelectRange: ((range: CalendarRange) => CalendarChangeAnswer<CalendarRange>) | undefined; onEventMove: ((change: CalendarEventChange<Data>) => CalendarChangeAnswer<CalendarEventChange<Data>>) | undefined; onEventResize: ((change: CalendarEventChange<Data>) => CalendarChangeAnswer<CalendarEventChange<Data>>) | undefined; onEventAction: ((event: CalendarEventInput<Data>) => void) | undefined; onMoreEvents: ((day: CalendarDate) => void) | undefined; renderEvent: ((event: CalendarEntry<Data>) => React.ReactNode) | undefined; renderDayHeader: ((day: CalendarDate) => React.ReactNode) | undefined; renderCell: ((cell: CalendarCellInfo) => React.ReactNode) | undefined; renderResource: ((resource: CalendarResource) => React.ReactNode) | undefined; entriesOn: (day: CalendarDate) => readonly CalendarEntry<Data>[]; }

  • viewtype CalendarViewRequired
  • setViewtype (value: React.SetStateAction<CalendarView>, ...args: any[]) => voidRequired
  • viewstype readonly CalendarView[]Required
  • datetype CalendarDateRequired
  • setDatetype (next: CalendarDate) => voidRequired
  • previoustype () => voidRequired
  • nexttype () => voidRequired
  • goToTodaytype () => voidRequired
  • titletype stringRequired
  • timeZonetype stringRequired
  • localetype stringRequired
  • firstDayOfWeektype FirstDayOfWeek | undefinedRequired
  • calendarIdtype string | undefinedRequired
  • entriestype CalendarEntry<Data>[]Required
  • indextype Map<string, CalendarEntry<Data>[]>Required
  • resourcestype readonly CalendarResource[]Required
  • slotDurationtype numberRequired
  • visibleHourstype readonly [number, number]Required
  • timelineUnittype CalendarTimelineUnitRequired
  • scheduleDaystype numberRequired
  • agendaDaystype numberRequired
  • maxEventsPerDaytype numberRequired
  • blockedAttype (start: ZonedDateTime, end: ZonedDateTime, resourceId: string | undefined) => { blocked: boolean; selectable: boolean; }Required
  • isBusinesstype (day: CalendarDate, hour: number) => booleanRequired
  • nowtype ZonedDateTime | nullRequired
  • todaytype CalendarDate | nullRequired
  • formatterstype { dayNumber: DateFormatter; weekday: DateFormatter; weekdayDay: DateFormatter; longDay: DateFormatter; time: DateFormatter; dateTime: DateFormatter; month: DateFormatter; shortDay: DateFormatter; range: DateFormatter; }Required
  • asDatetype (day: CalendarDate) => DateRequired
  • labelstype CalendarLabels & Partial<CalendarLabels>Required
  • iconstype { previous: React.ReactElement<unknown, string | React.JSXElementConstructor<any>>; next: React.ReactElement<unknown, string | React.JSXElementConstructor<any>>; more: React.ReactElement<unknown, string | React.JSXElementConstructor<any>>; empty: React.ReactElement<unknown, string | React.JSXElementConstructor<any>>; }Required
  • announcementtype stringRequired
  • announcetype React.Dispatch<React.SetStateAction<string>>Required
  • onSelectRangetype ((range: CalendarRange) => CalendarChangeAnswer<CalendarRange>) | undefinedRequired
  • onEventMovetype ((change: CalendarEventChange<Data>) => CalendarChangeAnswer<CalendarEventChange<Data>>) | undefinedRequired
  • onEventResizetype ((change: CalendarEventChange<Data>) => CalendarChangeAnswer<CalendarEventChange<Data>>) | undefinedRequired
  • onEventActiontype ((event: CalendarEventInput<Data>) => void) | undefinedRequired
  • onMoreEventstype ((day: CalendarDate) => void) | undefinedRequired
  • renderEventtype ((event: CalendarEntry<Data>) => React.ReactNode) | undefinedRequired
  • renderDayHeadertype ((day: CalendarDate) => React.ReactNode) | undefinedRequired
  • renderCelltype ((cell: CalendarCellInfo) => React.ReactNode) | undefinedRequired
  • renderResourcetype ((resource: CalendarResource) => React.ReactNode) | undefinedRequired
  • entriesOntype (day: CalendarDate) => readonly CalendarEntry<Data>[]Required

Spec status

Not part of Material Design 3: a Windmorph Pro component, built on M3's colour roles, type scale, shapes and motion. Its variants and configurations each link to a live example.

  • Month, week, day and agenda views

    Built

    Variant · Views

  • Creating, moving and resizing events

    Built

    Configuration · Editing

  • Resource schedule and timeline views (resources)

    Built

    Variant · Resources

Theming & tokens

Set the tokens below on the calendar or any ancestor. An event's color picks one of its role tokens. Style each part with classNames: root, toolbar, title, navigation, todayButton, viewSwitch, grid, header, headerCell, resourceHeader, allDayRow, timeGutter, slot, cell, dayNumber, event, eventTitle, eventTime, more, nowLine, blocked, businessHours, dragPreview, selectionRange, agendaGroup, agendaRow, loading, empty, liveRegion.

Calendar tokens
VariableDefaultPaints
--wm-calendar-surface-colorvar(--md-sys-color-surface)The calendar’s surface.
--wm-calendar-outline-colorvar(--md-sys-color-outline-variant)The lines between cells.
--wm-calendar-header-height48pxThe header row’s height.
--wm-calendar-header-text-colorvar(--md-sys-color-on-surface-variant)The header’s text.
--wm-calendar-cell-min-height112pxA month cell’s least height.
--wm-calendar-cell-padding4pxThe space inside a cell.
--wm-calendar-slot-height2remA time slot’s height at density 0; each density step takes 4px off.
--wm-calendar-gutter-width72pxThe width of the time gutter.
--wm-calendar-resource-column-width160pxA resource’s column in the schedule.
--wm-calendar-resource-row-height64pxA resource’s row in the timeline.
--wm-calendar-timeline-column-width96pxA column of the timeline.
--wm-calendar-today-colorvar(--md-sys-color-primary)The fill of today’s number.
--wm-calendar-today-text-colorvar(--md-sys-color-on-primary)The text of today’s number.
--wm-calendar-outside-month-colorvar(--md-sys-color-on-surface-variant)The number of a day outside the month.
--wm-calendar-event-shapevar(--md-sys-shape-corner-small)An event’s corners.
--wm-calendar-event-padding4pxThe space at an event’s sides.
--wm-calendar-event-status-min-width4chThe least an event’s status narrows to, in favour of its title.
--wm-calendar-event-height1.5remThe height of a bar in a month cell or the all-day row.
--wm-calendar-event-primary-colorvar(--md-sys-color-primary-container)The fill of an event with the primary role.
--wm-calendar-event-primary-text-colorvar(--md-sys-color-on-primary-container)The text of an event with the primary role.
--wm-calendar-event-secondary-colorvar(--md-sys-color-secondary-container)The fill of an event with the secondary role.
--wm-calendar-event-secondary-text-colorvar(--md-sys-color-on-secondary-container)The text of an event with the secondary role.
--wm-calendar-event-tertiary-colorvar(--md-sys-color-tertiary-container)The fill of an event with the tertiary role.
--wm-calendar-event-tertiary-text-colorvar(--md-sys-color-on-tertiary-container)The text of an event with the tertiary role.
--wm-calendar-event-error-colorvar(--md-sys-color-error-container)The fill of an event with the error role.
--wm-calendar-event-error-text-colorvar(--md-sys-color-on-error-container)The text of an event with the error role.
--wm-calendar-event-neutral-colorvar(--md-sys-color-surface-container-highest)The fill of an event with the neutral role.
--wm-calendar-event-neutral-text-colorvar(--md-sys-color-on-surface)The text of an event with the neutral role.
--wm-calendar-selection-colorvar(--md-sys-color-secondary-container)A cell in the range being selected.
--wm-calendar-drop-colorvar(--md-sys-color-primary)The outline of the cell an event would land in.
--wm-calendar-now-line-colorvar(--md-sys-color-error)The current-time line.
--wm-calendar-now-line-width2pxThe current-time line’s thickness.
--wm-calendar-business-hours-colorvar(--md-sys-color-surface-container-low)The tint of open hours.
--wm-calendar-blocked-colorvar(--md-sys-color-outline-variant)The stripes of a blocked range.
--wm-calendar-view-switch-width10remThe view choice’s width.
--wm-calendar-absent-opacity0.4A time slot that doesn’t exist on that day, as when the clocks change.
--wm-calendar-drag-opacity0.6An event while it is dragged or resized.
--wm-calendar-toolbar-gap8pxThe space between the toolbar’s parts.
--wm-calendar-settle-durationvar(--md-sys-motion-spring-effects-fast-duration)How long an event takes to settle after a drag.
--wm-calendar-settle-easingvar(--md-sys-motion-spring-effects-fast-easing)The curve of an event settling after a drag.
--wm-calendar-gutter-padding8pxThe space at the end of the time gutter.
--wm-calendar-resource-label-padding8pxThe space at the sides of a resource’s name in the timeline.
--wm-calendar-day-number-size24pxA month cell’s number.
--wm-calendar-bar-top-inset28pxThe space above the first bar in a month cell or the all-day row.
--wm-calendar-bar-gap2pxThe space between stacked bars.
--wm-calendar-agenda-padding8pxThe space inside an agenda day.
--wm-calendar-agenda-gap4pxThe space between an agenda day’s events.
--wm-calendar-agenda-event-padding8pxThe space above and below an agenda event.
--wm-calendar-agenda-row-min-height48pxAn agenda event’s least height.
--wm-calendar-resize-handle-height6pxThe height of an event’s resize handle.
--wm-calendar-empty-padding32pxThe space above and below the empty agenda.