ProSchedulerSign in

Features

Sizing and theming

Give the scheduler a height, tune row and hour sizes through styleConfig, and restyle it with the same design tokens shadcn/ui uses — light and dark.

Size

The scheduler fills the box you give it: height (default 600) and width set it, and each view scrolls within. Finer measurements live in styleConfig.

<ProScheduler
  height={640}              // px or any CSS length; the views scroll inside it
  width="100%"
  className="rounded-none"
  styleConfig={{
    hourHeightPx: 56,       // time grid: pixels per hour
    timeGutterWidth: 64,
    minColumnWidth: 90,     // time grid: narrowest column before it scrolls
    resourceColWidth: 200,  // timeline: the resource column
    unitWidthPx: 80,        // timeline: one axis unit (a minimum with fitToWidth)
    fitToWidth: true,
    laneHeight: 36,         // timeline: one event lane
    laneGap: 4,
    rowPadding: 6,
    minRowHeight: 48,
    headerHeight: 56,
  }}
  …
/>
styleConfig defaults
KeyDefaultControls
hourHeightPx48Time grid pixels per hour (ignored with fitToHeight)
timeGutterWidth64Width of the time labels column
minColumnWidth90Narrowest time grid column before the grid scrolls sideways
resourceColWidth176Timeline resource column width
unitWidthPx72Timeline axis unit width; a minimum when fitToWidth
fitToWidthtrueStretch the timeline axis to the panel width
laneHeight40Height of one stacked event lane
laneGap6Gap between stacked lanes
rowPadding8Vertical padding inside a timeline row
minRowHeight56Smallest timeline row
headerHeight56Column header height

Theme

The stylesheet defines the shadcn/ui design tokens — --background, --foreground, --card, --primary, --muted, --border, --radius and the rest — and every part of the scheduler is drawn from them. Redefine any after the import. If your app already defines them (a shadcn project does), yours apply as they are.

/* After the package stylesheet */
@import "@andreisaac/pro-scheduler/styles.css";

:root {
  --primary: oklch(0.55 0.2 25);      /* today badge, selection, current time */
  --radius: 0.375rem;
  --border: oklch(0.9 0 0);
}

.dark {
  --background: oklch(0.16 0.01 260);
  --card: oklch(0.2 0.01 260);
}

Dark mode follows a dark class on any ancestor, which is what next-themes sets. To force one scheduler dark regardless, pass themeVariant="dark".