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-temporal

The 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:

TopicWhat both frameworks shareRead
EventsdefineEventAdapter, validation, snapshots and queriesEvents and adapters
TimeTemporal values, timed, all-day and floating events, time zones and daylight saving timeTime and time zones
StateThe six state values, controlled and uncontrolled props, change handlers, and createCalendarStoreState
Recurrence@moltenship/calendar-recurrence turns series into ordinary events before the calendar sees themSeries and occurrences
ChangesProposals, onEventChange, onEventChangeResult, policies and pending changesInteractions
Undo historycreateEventHistory records results, and useCalendarHistory takes them backUndo and redo
KeyboardThe keys, roving focus and keyboard move, resize and create, through useCalendarKeyboardKeyboard
Pointer gesturesDrag, resize and create with a mouse, a pen or touch, through useCalendarPointerPointer layer
AnnouncementsAnnouncer and the messages a screen reader hearsAnnouncements
AgentsThe actions an agent can call, with the same names, inputs, results and errorsAgents in your app
RootIts props have the same names, types and defaultsRoot
A view's strategygetRange, navigate, getTitle and project, and the engine's projections, such as projectMonthCustom views
CSS hooksEach part renders the same data-calendar-part attribute, so a selector written for one matches the otherComponents

What differs

ReactSolid
Framework versionReact 19SolidJS 2.0
Packages you install@moltenship/calendar, @ui-sdk/core, @ui-sdk/react@moltenship/calendar-solid, @ui-sdk/core, @ui-sdk/solid
PartsRoot, the structural parts, Event and AnnouncerThe same parts
HooksEvery hook, returning valuesThe same hooks: accessors for state, refs from useCalendarKeyboard and useCalendarPointer
Ready-made viewsThe registry's views, in shadcn/ui with Tailwind CSS or in StyleXThe registry's views, in Tailwind CSS; none in StyleX
Keyboard navigation in a viewYesYes
Drag, resize and createYes, with a mouse, a pen or touchYes, with a mouse, a pen or touch
Undo and redouseCalendarHistory, its shortcuts and the registry's toastThe same, with the registry's toast
Screen reader announcementsCalendar.AnnouncerCalendar.Announcer
Server renderingYesYes, with renderToString and hydrate
Testing package@moltenship/calendar-testingNone. That package has React as a peer dependency
Agent bridge@ui-sdk/react/agent@ui-sdk/solid/agent

What Solid doesn't have

MissingIn React it's
StyleX viewsThe 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 ReactIn Solid
Hooks return valuesHooks that read state return accessors: state().view, not state.view
useCalendar() returns plain objectsmeta and state are getters. Read them in JSX, a memo or an effect, and don't destructure them
A Renderer gets props you can destructureA Renderer's props are getters: props.projection, read where it's used
meta.refs holds React refsmeta.refs holds accessors: meta().refs.viewport()
useCalendarKeyboard() returns handlersIt returns a ref, which binds keydown and focusout on the element itself
A cell's onKeyDown runs before the view'sIt runs after, since Solid delegates it. Listen natively from a ref to take a key first
useRovingFocus listens for focusinIt listens for focus, so a focus handler of yours hears "focus"
Calendar.Event's children get a valueThey get an accessor, and stay rendered while the event changes
A state change is visible on the next renderAn 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/agentThe 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.

On this page