Get started
Installation and first scheduler
ProScheduler is commercial software, published to a private npm registry. Add the registry to your .npmrc, install the package and its peers, import the stylesheet, and render.
Authenticate with the registry
@andreisaac/pro-scheduler is not on the public npm registry. Buy a project licence and issue a token from your account. One token installs every andreisaac package your account is licensed for. Then put this line in the project’s .npmrc — it holds no secret, so commit it:
@andreisaac:registry=https://andisaac-pro-scheduler.vercel.app/api/registry/Store the token once, outside the project. This writes it to your user-level npm config (~/.npmrc) and works the same on macOS, Linux and Windows:
npm config set //andisaac-pro-scheduler.vercel.app/api/registry/:_authToken ais_live_…Install
npm install @andreisaac/pro-schedulerPeer dependencies are not bundled, so you control their versions and there is exactly one copy of each:
npm install react react-dom radix-ui @base-ui/react @dnd-kit/core @tanstack/react-virtual lucide-react| Package | Range | Used for |
|---|---|---|
| react, react-dom | ^18.2 || ^19 | |
| radix-ui | ^1.4 | Dialog, select, tooltip |
| @base-ui/react | >=1.6 <2 | View and length toggles |
| @dnd-kit/core | ^6.1 | Moving events |
| @tanstack/react-virtual | ^3.10 | Timeline rows and the agenda list |
| lucide-react | >=1.21 <2 | Icons |
Import the stylesheet once, near your app root. It ships no CSS reset, so it will not disturb your base styles:
// Once, near your app root
import "@andreisaac/pro-scheduler/styles.css"Your first scheduler
ProScheduler is a client component, and it is controlled: it never edits the array you pass as data. Moves, resizes, creations and deletions each arrive as a callback; apply them to your state and the view follows.
"use client"
import { useState } from "react"
import { ProScheduler, type SchedulerEvent, type SchedulerResource } from "@andreisaac/pro-scheduler"
const resources: SchedulerResource[] = [
{ id: "ada", name: "Ada Moreno", color: "#2563eb" },
{ id: "ben", name: "Ben Okafor", color: "#059669" },
]
export function TeamWeek({ initial }: { initial: SchedulerEvent[] }) {
const [events, setEvents] = useState(initial)
return (
<ProScheduler
data={events}
resources={resources}
view={{ scheduler: { type: "week", startTime: "07:00", endTime: "20:00" } }}
height={620}
onEventCreated={(event) => setEvents((list) => [...list, event])}
onEventUpdated={(event) =>
setEvents((list) => list.map((e) => (e.id === event.id ? event : e)))
}
onEventDeleted={(event) =>
setEvents((list) => list.filter((e) => e.id !== event.id))
}
/>
)
}A week of studio bookings
Drag an event to another day, resize it from the bottom, or drag down an empty column to create one.
import { useMemo, useState, useSyncExternalStore } from "react"
import { ProScheduler, type SchedulerEvent } from "@/components/pro-scheduler"
import { studioResources, studioSessions } from "@/lib/demo-data/studio"
const subscribe = () => () => {}
/** False during the server render and hydration, true afterwards. */
function useHydrated() {
return useSyncExternalStore(subscribe, () => true, () => false)
}
function Placeholder({ height }: { height: number }) {
return <div aria-hidden className="docs-demo__placeholder" style={{ height }} />
}
/**
* ProScheduler is controlled: it never edits `data` itself. The callbacks below
* are the whole contract — apply the change, and the view re-renders from it.
*/
function useEvents(initial: () => SchedulerEvent[]) {
const [events, setEvents] = useState(initial)
const handlers = useMemo(
() => ({
onEventCreated: (event: SchedulerEvent) =>
setEvents((list) => [...list, { ...event, id: crypto.randomUUID() }]),
onEventUpdated: (event: SchedulerEvent) =>
setEvents((list) => list.map((e) => (e.id === event.id ? event : e))),
onEventDeleted: (event: SchedulerEvent) =>
setEvents((list) => list.filter((e) => e.id !== event.id)),
}),
[]
)
return { events, setEvents, handlers }
}
export function WeekDemo() {
const hydrated = useHydrated()
const { events, handlers } = useEvents(studioSessions)
if (!hydrated) return <Placeholder height={620} />
return (
<ProScheduler
data={events}
resources={studioResources}
view={{
scheduler: {
type: "week",
startTime: "07:00",
endTime: "20:00",
timeCellStep: 30,
dragTimeStep: 15,
currentTimeIndicator: true,
cursorTime: true,
},
}}
height={620}
{...handlers}
/>
)
}// 20 timed sessions around the current week.
type SchedulerEventId = string | number
type ResourceId = string | number
/** Accepts Date | ISO string | epoch ms; normalized to Date via {@link toDate}. */
type DateInput = Date | string | number
/** A row/grouping target. Extra keys are preserved (passthrough). */
interface SchedulerResource {
eventDragBetweenResources?: boolean
eventDragBetweenSlots?: boolean
eventDragInTime?: boolean
eventOverlap?: boolean
eventResize?: boolean
fixed?: boolean
reorder?: boolean
id: ResourceId
name: string
/** Accent color (hex/css), used for events lacking their own `color`. */
color?: string
/** Child resources: this one becomes a collapsible group (timeline). */
children?: SchedulerResource[]
/** Start this group collapsed. */
collapsed?: boolean
/** Set false to stop events being created on, or moved onto, this row. */
eventCreation?: boolean
/** Background of this resource's row (timeline) or columns (time grid). */
background?: string
/** Extra classes on this resource's row or columns. */
cssClass?: string
[key: string]: unknown
}
/** Everything an event has but its start (shared with dragged-in events). */
interface SchedulerEventFields {
cssClass?: string
cellCssClass?: string
textColor?: string
tooltip?: string
order?: number
timezone?: string
slot?: SlotId
dragBetweenResources?: boolean
dragBetweenSlots?: boolean
recurringExceptionRule?: PschRecurrence | string
id?: SchedulerEventId
title: string
/** Omit for point-in-time events: they are pinned at `start`, never resizable,
* and (in the scheduler view's auto mode) overlap-packed by rendered height. */
end?: DateInput
/** The resource it's booked on — or several, for a shared event (a meeting
* with three people shows in each of their rows or columns). */
resource?: ResourceId | ResourceId[]
color?: string
allDay?: boolean
/** Set false to lock this event: it renders but can't be moved or resized. */
editable?: boolean
/** Set false to keep the duration fixed: the event moves but can't be resized. */
resize?: boolean
/** Set false so moving can't change the time — only the resource (timeline).
* In the time grid, where a move always changes the time, the event is fixed. */
dragInTime?: boolean
/** Set false so moving can't change the resource — only the time. */
resourceEditable?: boolean
/** Minutes kept free before / after the event (travel, set-up, cleaning).
* Drawn as a hatched band, and counted when `eventOverlap` is false. */
bufferBefore?: number
bufferAfter?: number
/** Set false to refuse any overlap with this event, whatever `eventOverlap` says. */
overlap?: boolean
/** Repeat the event: a rule object, or an RRULE string such as
* "FREQ=WEEKLY;BYDAY=MO,WE;COUNT=10". `start`/`end` are the first occurrence. */
recurring?: PschRecurrence | string
/** Days left out of the series: "YYYY-MM-DD" strings or dates. */
recurringException?: DateInput | DateInput[]
/** Set on displayed occurrences: the `id` of the series they belong to. */
recurringEventId?: SchedulerEventId
[key: string]: unknown
}
interface SchedulerEvent extends SchedulerEventFields {
start: DateInput
}
/** A repeat rule — the object form of an RRULE. */
interface PschRecurrence {
from?: DateInput
weekStart?: number
repeat: "daily" | "weekly" | "monthly" | "yearly"
/** Every n days / weeks / months / years (default 1). */
interval?: number
/** Stop after this many occurrences (exceptions included). */
count?: number
/** Stop after this date. */
until?: DateInput
/** Weekdays: "MO,WE,FR" or [1, 3, 5] (0 = Sunday). In monthly and yearly
* rules an ordinal picks one: "2TU" (second Tuesday), "-1FR" (last Friday). */
weekDays?: string | number[]
/** Day(s) of the month; negative counts from the end (-1 = the last day). */
day?: number | number[]
/** Month(s) of a yearly rule, 1–12. */
month?: number | number[]
/** Pick the nth of the matching days in each period (-1 = the last), e.g.
* the last weekday of the month with `weekDays: "MO,TU,WE,TH,FR", pos: -1`. */
pos?: number
}
type SlotId = string | number
// The demos extend both with fields of their own — extra keys are kept
// and handed back to you on every callback.
import type { SchedulerEvent, SchedulerResource } from "@/components/pro-scheduler"
type StudioResource = SchedulerResource & {
id: string
name: string
role: string
color: string
}
type StudioEvent = SchedulerEvent & {
id: string
title: string
start: Date
end?: Date
resource: string
client: string
kind: "Shoot" | "Edit" | "Review" | "Pitch" | "Travel" | "Workshop"
}
const events: StudioEvent[] = [
{
"id": "s-1",
"title": "Kickoff call",
"client": "Harbor Coffee",
"kind": "Pitch",
"resource": "ben",
"start": "2026-09-28T09:00:00.000Z",
"end": "2026-09-28T10:00:00.000Z"
},
{
"id": "s-2",
"title": "Location scout",
"client": "Harbor Coffee",
"kind": "Travel",
"resource": "ada",
"start": "2026-09-28T11:00:00.000Z",
"end": "2026-09-28T14:00:00.000Z"
},
{
"id": "s-3",
"title": "Rough cut review",
"client": "Aurora Bank",
"kind": "Review",
"resource": "chloe",
"start": "2026-09-28T15:00:00.000Z",
"end": "2026-09-28T16:30:00.000Z"
},
// …17 more events
]Set up your AI coding assistant
The package includes an agent skill: instructions that tell a coding assistant how to use ProScheduler correctly — the controlled data model, the view options and the callbacks — so it uses the real prop names instead of guessing them. It lives at node_modules/@andreisaac/pro-scheduler/skills/pro-scheduler and always matches the version you installed. Install it with the open skills CLI:
npx skills add ./node_modules/@andreisaac/pro-scheduler/skillsOr copy the folder into your assistant’s skills folder by hand:
# macOS / Linux
mkdir -p .claude/skills && cp -r node_modules/@andreisaac/pro-scheduler/skills/pro-scheduler .claude/skills/
# Windows (PowerShell)
New-Item -ItemType Directory -Force .claude\skills | Out-Null; Copy-Item -Recurse -Force node_modules\@andreisaac\pro-scheduler\skills\pro-scheduler .claude\skills\