The event type
Events are plain objects. The only required fields arestart, end, and
title; everything else is yours. CalendarEvent<T> is generic, so you can
attach your own fields and read them back in callbacks and renderers.
allDaylays the event out in the all-day lane above the grid instead of in the columns. It’s also inferred for midnight-to-midnight spans. PassshowAllDayEventCell={false}to hide the lane entirely (its events won’t show). In thescheduleview (which has no lane) an all-day event reads “All day” instead of a time range; override the wording withallDayLabel(e.g. for a different language).disabledopts an event out of drag interactions.draggable,startEditable, anddurationEditablecontrol per-event drag and resize (see the drag guide).- Multi-day events draw as one continuous bar across the days they span in the month view, and as a per-day clipped segment on the week/day time grid.
Render your own event
PassrenderEvent — a component (so it can use hooks) that receives
RenderEventArgs. It’s used in every mode and for every event shape (timed,
all-day, multi-day), so you only write it once.
boxHeight, so it tracks the grid’s hour scale as the grid zooms or
resizes. Fit your content to boxHeight: the built-in renderer clamps its own
content, and a custom renderer should adapt (show less, or scroll) rather than
assume a fixed size, since content taller than the slot is clipped.
Lighter touches
If you only want to tweak the built-in event box, you don’t need a fullrenderEvent:
eventCellStyle— a style (or a function of the event) merged onto the built-in box.keyExtractor— a stable key per event; defaults to start-time + index.showTimeshows the time range under the title (default true). The title comes first: on the day/week grid it fills the box with as many whole lines as fit (never a half-cut line), and the time only appears once a full line is free beneath it.ellipsizeTitleends a single-line title (the all-day lane, month cells) with a trailing ellipsis when it overflows, instead of a hard clip (default false).
Screen-reader labels
Each event announces a built-in label: its title plus the time range (or “all day”), which the grid otherwise only shows visually. Override it per event witheventAccessibilityLabel. It receives the event and a { mode, isAllDay, ampm }
context, and its return value replaces the default label across every view.
MonthView, MonthList, and TimeGrid, so a
custom renderer and its label stay in sync.
Background events
Setdisplay: "background" to paint an event’s time range as a shaded,
non-interactive band behind the grid instead of an event box — blocked time,
maintenance windows, public holidays:
backgroundEvent slot or the theme’s
backgroundEvent colour token.
Loading events from a feed
useEventSource (from @super-calendar/core) owns the fetching for you: point
it at a JSON feed, an iCalendar feed (.ics URLs are parsed automatically), or
your own async function, and hand the result to any view. Set
refetchIntervalMs for a live feed; refetch reloads on demand, and a failed
refetch keeps the previous events while reporting error.
start/end strings; pass map to
reshape anything else (rename fields, attach a resourceId, filter).
One nuance for function sources: swapping the function itself doesn’t trigger a
refetch (inline functions change identity every render, which would loop).
The next interval tick or a manual refetch() always calls the latest
function, so change what the function reads, or call refetch() after
swapping it.