Skip to content

Framework bindings

Doran ships four framework bindings, all riding the same shared engine — the @doranjs/wc custom elements. The calendar/grid logic is written once and never reimplemented per framework; each binding just layers that framework's idiomatic convention on top. The change convention is uniform: the value is a DoranDate, and the change event also reports the Gregorian Date for your backend.

Side by side

ReactVueSvelteAngular
Install@doranjs/react@doranjs/vue@doranjs/svelte@doranjs/angular
Value bindingvalue/onChangev-modelbind:value[formControl] (CVA)
Value typeDoranDateDoranDateDoranDateDoranDate
Gregorian fromonChange 2nd argchange payloadchange detail(change) payload
Headless griduseCalendaruseCalendarGridcreateCalendarGridcreateCalendarGrid (signals)
ProviderDoranProviderDoranProviderDoranProviderdr-provider / DORAN_DEFAULTS
Provider mechanismcontextprovide/injectcontextDI

All four bindings expose the same component set: DoranDatePicker, DoranCalendar, DoranRangePicker, DoranNlpInput, and DoranAgenda. Any attribute the underlying element supports (locale, format, with-time, min, max, …) passes straight through — see @doranjs/wc for the full list.

Validation & forms

For framework-agnostic validation, @doranjs/zod provides a zDoranDate() schema that coerces an ISO string, Date, epoch, or DoranDate into a DoranDate and drops into any form stack via its zod resolver (react-hook-form, VeeValidate, superforms, …).

SSR

@doranjs/wc is SSR-guarded, so server rendering emits the inert tag and hydration upgrades it. To keep digits/tz deterministic across the two passes, wrap your app in DoranProvider. Details in the SSR guide.

Released under the MIT License.