Installation
Requirements, the packages to install, the ui-sdk peer dependencies, and Temporal setup.
Requirements
- React 19. React and React DOM are peer dependencies.
- ui-sdk.
@ui-sdk/coreand@ui-sdk/reactare peer dependencies since 2.0. The calendar's parts are ui-sdk components, which is how an agent reaches them. ui-sdk is in beta, and the calendar takes0.1.0-beta.16and the betas after it.
- A JavaScript runtime with
Temporal. Node.js 26 and later include it. Browser support is still rolling out, so check the MDN compatibility table for the browsers you support and add a polyfill if needed (see below). - TypeScript 6 or later with
"lib": ["DOM", "DOM.Iterable", "ESNext"].ESNexthas theTemporaltypes.
Install
pnpm add @moltenship/calendar @ui-sdk/core @ui-sdk/react react react-dom@moltenship/calendar is the only calendar package most React apps import. It includes the React
components, the event engine, the Temporal helpers, and the pointer interactions. Recurring events
add @moltenship/calendar-recurrence, reading ICS feeds
@moltenship/ics, and dragging your own dnd-kit items into the calendar
@moltenship/calendar-dnd-kit. See How it works for what's inside.
You import ui-sdk yourself in one case: to create the agent bridge, from
@ui-sdk/react/agent. Keep one copy of @ui-sdk/core in your app. The calendar and the bridge
find each other through it, and with two copies an agent sees no calendar. Your package manager
keeps one as long as every @ui-sdk/* package is on the same version.
Temporal
Time uses the global Temporal object and never bundles a polyfill. In a runtime without
Temporal, load one before any code that imports the calendar. This entry file loads
temporal-polyfill only where it's missing,
then loads the app:
if (!("Temporal" in globalThis)) await import("temporal-polyfill/global");
// Import the app afterwards, so no module runs before Temporal exists.
const { App } = await import("./app");Any polyfill that defines globalThis.Temporal works.
TypeScript
Make sure your tsconfig.json includes the ESNext library so Temporal is typed:
{
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ESNext"]
}
}UI source (optional)
The packages render plain, unstyled elements. The styled views, toolbar and theme are React source files that you add to your app and then own, the way shadcn/ui works. They install with the shadcn CLI from this site's registry. There's no other installer. An app that brings its own UI skips this section, as Build your own UI describes.
Set up shadcn/ui with Tailwind CSS 4 if your app
doesn't use it yet. shadcn add needs its components.json, and the calendar's files use its
tokens, such as --background and --primary:
npx shadcn@latest initAny style works: the calendar brings its own controls and uses none of your app's components. An
app with a components.json but without shadcn's tokens gets shadcn's neutral ones from
base-tokens:
npx shadcn@latest add https://time.molten.sh/r/base-tokens.jsonAdd the calendar. calendar-full installs every view, the theme and the parts they share:
npx shadcn@latest add https://time.molten.sh/r/calendar-full.jsonOr add only the views you use. Each one brings what it builds on: the theme, the shared
calendar parts, the calendar's controls, and npm packages such as @moltenship/calendar.
| Item | What it adds |
|---|---|
calendar-full | Every item below but base-tokens |
calendar-theme | The calendar's tokens and event colors, added to your global CSS |
calendar-ui | The calendar's controls and popups, built on ui-sdk |
calendar | CalendarToolbar, ViewSwitcher, EventChip, MiniMonth and shared parts |
time-grid-view | The week and day views |
month-view | The month view |
list-view | The agenda view |
year-view | The year view |
scrolling-time-grid-view | The scrolling week and day views |
scrolling-month-view | The scrolling month view |
scrolling-list-view | The scrolling agenda |
resource-columns-view | The resource columns view |
resource-timeline-view | The resource timeline views |
recurrence-scope-dialog | The recurrence scope dialog |
calendar-history-toast | The undo toast |
base-tokens | shadcn/ui's neutral tokens, for an app without them |
Each item's address is https://time.molten.sh/r/<item>.json:
npx shadcn@latest add https://time.molten.sh/r/month-view.jsonThe files land in calendar/ under the components alias in your components.json, such as
components/calendar/month-view/month-view.tsx, and their imports follow your aliases. Each item
asks for the @moltenship/calendar versions it was built for, and shadcn add installs a
matching one. calendar-ui lists @ui-sdk/core and @ui-sdk/react, so shadcn add adds them if
your app doesn't have them yet. Keep them on the version the calendar uses, as above.
To add items by name, add the registry to components.json once:
{
"registries": {
"@moltenship": "https://time.molten.sh/r/{name}.json"
}
}Then npx shadcn@latest add @moltenship/month-view works too.
The calendar's controls come from calendar-ui, not from your app's components/ui: its
buttons, badges, tooltips, selects, popovers, dialogs and toasts. They're a default: to use your
own, see
Use your own controls. ui-sdk
adds a little CSS of its own to the page, in a layer named ui-sdk. Name that layer before
Tailwind in your global CSS, so your styles and Tailwind's win over it:
@layer ui-sdk;
@import "tailwindcss";The calendar's popups, such as the view select's list, its tooltips, popovers and dialogs, open
in the browser's top layer, through the Popover API: Chrome and Edge 114, Safari 17 and Firefox 125 or later. In an older browser they
render at the end of the page instead, and a server-rendered page doesn't hydrate them cleanly.
The toolbar's tooltips open after 400 ms; change tooltipDefaults in
components/calendar/ui/tooltip.styles.ts, or pass delay to a Tooltip.
For an app on StyleX rather than Tailwind, every item has a stylex- version; see
StyleX.
The theme's tokens and rules go into your global CSS inside @layer base, so your own rules win
over them. Each shadcn add writes that block again, so change tokens in your own rules instead,
as Theming shows. Run shadcn add again to update the files: it
asks before it replaces a file you already have, and --overwrite replaces them all, with any
changes you made.
Run from source
To work on Time, or to try changes that aren't released yet, run it and this documentation site
from the repository. You need Node.js 26 and the Vite+ CLI (vp).
git clone https://github.com/Moltenship/time.git
cd time
vp install
vp run devvp run dev starts this site locally. The examples on these pages are real files, type-checked
against the current packages. They are in apps/showcase/content/examples.
Next, build a calendar in the Quick start.