Skip to main content

Properties Overview

Reactive props accepted by the <Calendar> component. Each entry links to a dedicated page with the full type signature and an example.

Properties

cellCssReturns CSS class names applied to grid and month-grid cells
childrenSidebar slot rendered next to the calendar grid
datePivot date that determines the visible range on mount
eventContentCustom React component that replaces the inner markup of each event
eventCssReturns CSS class names applied to event wrappers
eventPopupCustom React component rendered as the event card on event click
eventsArray of events rendered by the calendar
initOne-shot callback that delivers the calendar instance API after store init
Properties OverviewAll Calendar component props at a glance
readonlyDisables drag, create, and the toolbar add-event button
recurringEnables expansion of events with rrule into concrete occurrences
toolbarConfigures or hides the toolbar above the calendar grid
tooltipCustom React component rendered as a hover tooltip over events
viewActive calendar view id on mount
viewsLists which calendar views are available and how each one is configured

Event handlers

Each on* prop fires when the matching store action runs. Setting a prop is equivalent to calling api.on(action, handler) with a single listener.

For multiple listeners, cancellation, or pre-action interception, use the action API instead - see on and intercept. Each action page below documents both forms (Trigger / Observe / Intercept / Component handler).

Handlers

PropActionFires when
onNavigateTonavigate-toThe calendar jumps to a specific date and/or view.
onNavigateTimenavigate-timePrev / Next / Today is dispatched.
onAddEventadd-eventA new event is added (drag-create, toolbar button, programmatic).
onUpdateEventupdate-eventAn event is edited (inline edit, drag, resize).
onDeleteEventdelete-eventAn event is deleted.
onSelectEventselect-eventSelection changes (null payload deselects).
onMoveEventmove-eventDrag-progress dispatch - no built-in store mutation.
onFilterEventsfilter-eventsA filter predicate is applied or cleared.
onActionactionA custom toolbar item or context-menu entry dispatches an action.

Usage

import { Calendar } from "@svar-ui/react-calendar";

const onAddEvent = ({ event, id }) => {
console.log("added", id, event);
};

<Calendar events={events} onAddEvent={onAddEvent} />

For payload shape and intercept semantics, follow the link to the matching action page.