Installation
npm and bundlers
For React, install compatible peers if needed:
The @types packages are for TypeScript applications. There is one published package: import
vanilla APIs from z-cal and React APIs from z-cal/react. Do not run npm install z-cal/react;
it is a subpath export. Solid/Svelte packages in the repository are private placeholders.
The host must exist when createCalendar runs. Call calendar.destroy() on teardown. The React
component handles mounting and cleanup; see the quickstart.
Runtime requirements
- ESM: use
import, with an ESM-aware bundler/runtime. There is no CommonJSrequireentry. - Browser DOM: interactive rendering requires a browser. React server rendering produces an empty host; it mounts the calendar on the client.
- Temporal:
z-cal/polyfillloads the included polyfill only when native Temporal is absent. Keep this import for portability; it uses top-levelawait, which your bundler must support. - CSS: import
z-cal/style.cssonce at your application's stylesheet entry. Importing JavaScript alone does not load the published stylesheet. - React: the adapter requires React and React DOM 19. React is optional for vanilla consumers.
- Node: package metadata declares Node
>=22.12. Node is relevant to tooling and SSR, not a substitute for a browser DOM. Repository development uses Node 26 and Bun 1.4.2.
Styles target modern browsers with CSS nesting, subgrid, oklch(), and light-dark() support.
The CSS build targets Chrome 123, Firefox 120, and Safari 17.5; this is a build configuration, not
an exhaustive compatibility guarantee. Automated browser coverage uses Chromium and WebKit.
In server/client frameworks, put the interactive component in a client boundary and follow the framework's rules for global CSS imports. See React server rendering.
CDN without a bundler
This complete HTML page uses a pinned release and exposes the global ZCal. The IIFE includes
the Temporal polyfill and built-in plugins. Load its companion CSS separately.
Use the same pinned version for the script and stylesheet. The React adapter is an ESM entry,
not part of the ZCal global. See API exports for smaller import paths.