React and Solid
What the React and SolidJS 2 integrations share, what each one has, and what Solid doesn't have.
Time's engine is in packages that import no UI framework. An integration package renders it in one framework. There are two integrations, and each has its own docs: the select at the top of the sidebar switches between them and keeps you on the same page where both have it. React's integration and SolidJS 2's have the same parts and hooks, and the registry has every view for both, in StyleX for React alone.
The layers
views React or Solid source from the registry, or components you write
integration @moltenship/calendar (React) @moltenship/calendar-solid (Solid)
calendar @moltenship/calendar-primitives state, actions, what an agent can call
engine @moltenship/calendar-core events, time zones, layout, changes, policies
@moltenship/calendar-temporalThe engine and the calendar layer import neither React nor Solid. Each integration is a thin package over them. It renders the parts and binds state to its framework's reactivity. The React and Solid integrations don't import each other.
The calendar layer also holds the logic for keyboard navigation, roving focus, gesture drafts and
undo history, and @moltenship/calendar-dnd, the pointer layer, imports no framework. Both
integrations bind all of them, so a key or a drag does the same thing in both.
What is the same
These work the same in both frameworks, because they run below the integration:
| Topic | What both frameworks share | Read |
|---|---|---|
| Events | defineEventAdapter, validation, snapshots and queries | Events and adapters |
| Time | Temporal values, timed, all-day and floating events, time zones and daylight saving time | Time and time zones |
| State | The six state values, controlled and uncontrolled props, change handlers, and createCalendarStore | State |
| Recurrence | @moltenship/calendar-recurrence turns series into ordinary events before the calendar sees them | Series and occurrences |
| Changes | Proposals, onEventChange, onEventChangeResult, policies and pending changes | Interactions |
| Undo history | createEventHistory records results, and useCalendarHistory takes them back | Undo and redo |
| Keyboard | The keys, roving focus and keyboard move, resize and create, through useCalendarKeyboard | Keyboard |
| Pointer gestures | Drag, resize and create with a mouse, a pen or touch, through useCalendarPointer | Pointer layer |
| Announcements | Announcer and the messages a screen reader hears | Announcements |
| Agents | The actions an agent can call, with the same names, inputs, results and errors | Agents in your app |
Root | Its props have the same names, types and defaults | Root |
| A view's strategy | getRange, navigate, getTitle and project, and the engine's projections, such as projectMonth | Custom views |
| CSS hooks | Each part renders the same data-calendar-part attribute, so a selector written for one matches the other | Components |
What differs
| React | Solid | |
|---|---|---|
| Framework version | React 19 | SolidJS 2.0 |
| Packages you install | @moltenship/calendar, @ui-sdk/core, @ui-sdk/react | @moltenship/calendar-solid, @ui-sdk/core, @ui-sdk/solid |
| Parts | Root, the structural parts, Event and Announcer | The same parts |
| Hooks | Every hook, returning values | The same hooks: accessors for state, refs from useCalendarKeyboard and useCalendarPointer |
| Ready-made views | The registry's views, in shadcn/ui with Tailwind CSS or in StyleX | The registry's views, in Tailwind CSS; none in StyleX |
| Keyboard navigation in a view | Yes | Yes |
| Drag, resize and create | Yes, with a mouse, a pen or touch | Yes, with a mouse, a pen or touch |
| Undo and redo | useCalendarHistory, its shortcuts and the registry's toast | The same, with the registry's toast |
| Screen reader announcements | Calendar.Announcer | Calendar.Announcer |
| Server rendering | Yes | Yes, with renderToString and hydrate |
| Testing package | @moltenship/calendar-testing | None. That package has React as a peer dependency |
| Agent bridge | @ui-sdk/react/agent | @ui-sdk/solid/agent |
What Solid doesn't have
| Missing | In React it's |
|---|---|
| StyleX views | The registry's stylex- items, which are React source |
| A testing package | @moltenship/calendar-testing, which is React only |
| A dnd-kit adapter | @moltenship/calendar-dnd-kit, which has React as a peer dependency |
The registry's Solid items install with the same shadcn add command as React's, from the Solid
registry, and calendar-full installs all of them. Issue #279
tracked the steps. StyleX views for Solid are out of scope for 2.0, and the testing package and
the dnd-kit adapter have no Solid plan yet.
For a view the registry doesn't have, you write its Renderer with the package's hooks, as
Custom views does. The
Solid demo is the React demo's app in Solid, on
the registry's views, with keyboard navigation, dragging and undo. Its source is the repository's
apps/demo-solid.
The Solid docs have no page on something Solid lacks, so they have none on StyleX, testing or the dnd-kit adapter.
From React to Solid
The same calendar reads differently in the two frameworks in these places:
| In React | In Solid |
|---|---|
| Hooks return values | Hooks that read state return accessors: state().view, not state.view |
useCalendar() returns plain objects | meta and state are getters. Read them in JSX, a memo or an effect, and don't destructure them |
A Renderer gets props you can destructure | A Renderer's props are getters: props.projection, read where it's used |
meta.refs holds React refs | meta.refs holds accessors: meta().refs.viewport() |
useCalendarKeyboard() returns handlers | It returns a ref, which binds keydown and focusout on the element itself |
A cell's onKeyDown runs before the view's | It runs after, since Solid delegates it. Listen natively from a ref to take a key first |
useRovingFocus listens for focusin | It listens for focus, so a focus handler of yours hears "focus" |
Calendar.Event's children get a value | They get an accessor, and stay rendered while the event changes |
| A state change is visible on the next render | An accessor has the new value once Solid flushes: a microtask later, or after flush() |
@moltenship/calendar is the one package | @moltenship/calendar-solid is the one package too: it re-exports the engine |
The bridge is @ui-sdk/react/agent | The bridge is @ui-sdk/solid/agent |
The state model, controlled and uncontrolled props, change handlers, onEventChange and
onEventChangeResult, policies, pending changes and every agent action are the same.
Other frameworks
Time has no integration for Vue, Svelte, Angular or any framework other than these two. You'd write
one on @moltenship/calendar-primitives, and its API can still change.
See Primitives.