Skip to content

Collection

A shareable, portable bundle of events (a .cdy document is its JSON form). Inert data: a manifest of the plugins its events need + the events themselves. Load it with cal.load() after registering the declared plugins.

optional $schema?: string

Optional JSON Schema URL for editor/AI validation + autocomplete of the .cdy document. Point it at the published schema: "https://calendaryjs.dev/schema/cdy.json". The core ignores it at runtime.


optional collection?: string

Collection name; used as the group id when id is omitted.


optional color?: string

Group color, applied to every event that lacks its own (event-level wins).


events: (Buildable | EventConfig)[]

The events — plain configs (as in a .cdy file) or builders.


optional id?: string

Group id (defaults to collection, else "collection").


optional name?: string

Group display name.


optional plugins?: string[]

Plugin package names the events need — validated on load.


optional priority?: number

Base priority for every event this collection loads that lacks its own (event-level wins). Overridable at load time via load(cdy, { priority }).


optional version?: string

Collection version (semver-ish, informational).