Installation
Requirements, the packages to install, the ui-sdk peer dependencies, and Temporal setup.
Requirements
- SolidJS 2.0.
solid-jsand@solidjs/webare peer dependencies. - ui-sdk.
@ui-sdk/coreand@ui-sdk/solidare peer dependencies. 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-solid solid-js @solidjs/web @ui-sdk/core @ui-sdk/solid@moltenship/calendar-solid is the only calendar package most Solid apps import. It has the parts
and the hooks, and it re-exports the event engine and the Temporal helpers, so
the event adapter and the functions a view is made of come from it too. Don't install
@moltenship/calendar: it's the React package.
Two more packages are optional, and neither imports a framework. Recurring events add
@moltenship/calendar-recurrence, and reading ICS feeds adds
@moltenship/ics. Install each when you import it.
You import ui-sdk yourself in one case: to create the
agent bridge, from @ui-sdk/solid/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.
Build setup
The integration is plain TypeScript, and @ui-sdk/solid ships JSX for your app's Solid compiler.
With Vite, use Solid's plugin, @solidjs/vite-plugin. It's a dev dependency of your app, beside
vite and typescript:
import solid from "@solidjs/vite-plugin";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [solid()],
optimizeDeps: {
// One copy of ui-sdk's core in the dev server. The calendar and the agent bridge find each
// other through it.
exclude: ["@ui-sdk/core"],
},
});{
"compilerOptions": {
"jsx": "preserve",
"jsxImportSource": "@solidjs/web",
"lib": ["ESNext", "DOM", "DOM.Iterable"]
}
}If the page fails with React is not defined from a file in @ui-sdk/solid, the plugin didn't
compile that package as Solid. Check that @ui-sdk/solid is in your app's own dependencies,
where the install command puts it.
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.
The ESNext library in the tsconfig.json above has the Temporal types.
UI source (optional)
The package renders plain, unstyled elements. The registry has styled Solid views, the
week and day, the month, the year and the agenda, the
scrolling versions of all but the year, the resource columns and the resource timeline, with the toolbar and mini month, the
recurring-event dialog, the undo toast
and the controls they're built from, as 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 Solid registry,
at https://time.molten.sh/r/solid. A view it doesn't have is one you write, as
Custom views shows.
| Item | What it adds |
|---|---|
calendar-full | Every item below but base-tokens |
time-grid-view | The week and day |
month-view | The month |
year-view | The year |
list-view | The agenda |
scrolling-time-grid-view | The scrolling week, 3-day and day, on time-grid-view |
scrolling-month-view | The scrolling month, on month-view |
scrolling-list-view | The scrolling agenda, on list-view |
resource-columns-view | The resource columns, on time-grid-view |
resource-timeline-view | The resource timeline, with @tanstack/virtual-core |
recurrence-scope-dialog | The recurring-event dialog, which asks which events of a series a change applies to |
calendar-history-toast | The undo toast, with the undo and redo keys |
calendar | The toolbar, view switcher and mini month, and the event chip, names and keys the views share |
calendar-ui | The controls the views are built from, on ui-sdk: button, badge, tooltip, select, popover, dialog, toast and the icons |
calendar-theme | The calendar's color tokens and its event colors, in event-colors.ts |
base-tokens | shadcn/ui's neutral tokens for light and dark, for an app without them |
time-grid-view, month-view, year-view, list-view and resource-timeline-view bring calendar, calendar-ui and calendar-theme with them, and
scrolling-time-grid-view, scrolling-month-view and scrolling-list-view bring the view they scroll, and resource-columns-view the week and day it reuses. An app with its own shadcn/ui-style
theme, which defines --background, --border, --primary and the rest, skips base-tokens.
Set up Tailwind CSS 4
The files style themselves with Tailwind classes, so the app needs Tailwind CSS 4 and its
preflight. With Vite, install tailwindcss and @tailwindcss/vite as dev dependencies, and add
@tailwindcss/vite to the plugins in the vite.config.ts above, after Solid's.
Import Tailwind in your global stylesheet, below an @layer ui-sdk; that puts your styles after
the CSS ui-sdk adds to the page, and make Tailwind's dark: variant follow a .dark ancestor, as
the theme does:
/* Declared first, so the app's styles win over the CSS ui-sdk adds to the page. */
@layer ui-sdk;
@import "tailwindcss";
/* The calendar's theme switches on a `.dark` ancestor, so the `dark:` classes do too. */
@custom-variant dark (&:is(.dark *));The files import each other through the @/ alias. Map it in tsconfig.json, beside the
settings above:
{
"compilerOptions": {
"paths": { "@/*": ["./src/*"] }
}
}With Vite, also set resolve: { tsconfigPaths: true } in vite.config.ts, so the dev server
reads that alias.
Point the shadcn CLI at the Solid registry
The CLI has no Solid template to init from, so write components.json at the app's root
yourself. registries names the Solid registry, so @moltenship/<item> installs the Solid items,
and tailwind.css names the stylesheet the theme's tokens go into:
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "base-nova",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "",
"css": "src/app.css",
"baseColor": "neutral",
"cssVariables": true
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"registries": {
"@moltenship": "https://time.molten.sh/r/solid/{name}.json"
}
}Add the items
calendar-full installs every view, the theme and the parts they share:
npx shadcn@latest add @moltenship/base-tokens @moltenship/calendar-fullOr add only the views you use. Each one brings what it builds on, so the agenda alone is:
npx shadcn@latest add @moltenship/base-tokens @moltenship/list-viewWithout registries in components.json, give the item's full address instead:
npx shadcn@latest add https://time.molten.sh/r/solid/base-tokens.json https://time.molten.sh/r/solid/calendar-full.jsonFor the agenda, the CLI writes the tokens into src/app.css and these files under
components/calendar:
src/components/calendar
├── event-colors.ts calendar-theme
├── announcements.ts calendar
├── calendar-toolbar.tsx
├── event-chip.tsx
├── event-label.ts
├── event-names.ts
├── mini-month.tsx
├── resource-status.tsx
├── resource-time.tsx
├── scrolling-axis.tsx
├── view-keyboard.ts
├── view-switcher.tsx
├── … their styles and logic
├── ui calendar-ui
│ ├── badge.tsx
│ ├── button.tsx
│ ├── dialog.tsx
│ ├── icons.tsx
│ ├── popover.tsx
│ ├── select.tsx
│ ├── toast.tsx
│ ├── tooltip.tsx
│ └── … their styles
└── list-view list-view
├── agenda-view.tsx
├── agenda-list.tsx
├── agenda-day.tsx
├── agenda-item.tsx
├── agenda-states.tsx
├── agenda-rows.ts
├── agenda-labels.ts
├── agenda.styles.ts
├── agenda-virtualizer.ts
└── use-agenda-virtualizer.tsThe .styles.ts, label, row, key map and virtualizer files are plain TypeScript, with no JSX:
a view's classes, its words and its keys are each in one file. shadcn add
adds the npm packages the files import, such as @tanstack/virtual-core, if your app doesn't have
them yet. Each item names the range of @moltenship/calendar-solid it's built for, so the CLI
installs a version the files compile against.
Register the view
Add the agenda to your calendar, and render it in Calendar.ActiveView:
import {
createCalendar,
createCanonicalEventAdapter,
type CalendarEvent,
} from "@moltenship/calendar-solid";
import type { CalendarEventColor } from "@/components/calendar/event-colors";
import { createAgendaView } from "@/components/calendar/list-view/agenda-view";
export type Event = CalendarEvent<{ readonly color: CalendarEventColor }>;
export const Calendar = createCalendar<Event>()({
eventAdapter: createCanonicalEventAdapter<{ readonly color: CalendarEventColor }>(),
views: [createAgendaView<Event>({ getEventColor: (event) => event.data.color })],
});const events: readonly Event[] = [
{
data: { color: "blue" },
end: Temporal.Instant.from("2026-10-08T09:30:00Z"),
id: "standup",
kind: "timed",
start: Temporal.Instant.from("2026-10-08T09:00:00Z"),
title: "Standup",
},
{
data: { color: "teal" },
end: Temporal.PlainDate.from("2026-10-10"),
id: "conference",
kind: "all-day",
start: Temporal.PlainDate.from("2026-10-08"),
title: "Conference",
},
];
export default function CalendarPage() {
return (
<div class="flex h-dvh flex-col">
<Calendar.Root
defaultAnchorDate={Temporal.PlainDate.from("2026-10-08")}
defaultTimeZone="UTC"
defaultView="agenda"
events={events}
locale="en-US"
weekRules={{ firstDay: 7, minimalDays: 1, weekend: [6, 7] }}
>
<h1 class="p-4 text-lg font-semibold">
<Calendar.Title />
</h1>
{/* The view fills what the title leaves, and scrolls inside it. */}
<div class="min-h-0 flex-1">
<Calendar.ActiveView />
</div>
</Calendar.Root>
</div>
);
}Toolbar and mini month adds the toolbar, the view switcher and a mini month around it.
The theme switches when an ancestor of the calendar has the dark class, as shadcn/ui does. Toggle
it on <html> from your app's theme setting; the @custom-variant line in src/app.css makes the
files' dark: classes follow the same class. The theme's tokens go into src/app.css inside
@layer base, so your own rules win over them: change a token in a rule of your own, as
Theming shows.
The files are copies you own: edit them as you would any component. A fix in the registry reaches
your app when you add the item again. The command writes the files your app doesn't have, skips
the ones that match, and asks before it replaces one that differs. --dry-run lists what it would
do, and --diff with a path from that list prints the difference, writing nothing:
npx shadcn@latest add @moltenship/list-view --dry-run
npx shadcn@latest add @moltenship/list-view --diff src/components/calendar/list-view/agenda-view.tsxRun 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/solid.
Next, build a calendar in the Quick start.