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,
}}
…
/>| Key | Default | Controls |
|---|---|---|
| hourHeightPx | 48 | Time grid pixels per hour (ignored with fitToHeight) |
| timeGutterWidth | 64 | Width of the time labels column |
| minColumnWidth | 90 | Narrowest time grid column before the grid scrolls sideways |
| resourceColWidth | 176 | Timeline resource column width |
| unitWidthPx | 72 | Timeline axis unit width; a minimum when fitToWidth |
| fitToWidth | true | Stretch the timeline axis to the panel width |
| laneHeight | 40 | Height of one stacked event lane |
| laneGap | 6 | Gap between stacked lanes |
| rowPadding | 8 | Vertical padding inside a timeline row |
| minRowHeight | 56 | Smallest timeline row |
| headerHeight | 56 | Column 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".