Scheduler
Month-view event calendar that lays events onto day cells.
Import
tsx
import { Scheduler } from "@cronus-ui/ui";
bash
npx cronus-ui add scheduler
Examples
.cronus
The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.
default.cronus
app "audit-fixtures" {
port 5176
}
style {
preset aurora
theme dark
}
component SchedulerDefault layout:inline style:scheduler {
defaultMonth:"2026-06-01"
today:"2026-06-15"
label "June 2026"
text "Launch call"
text "Webinar"
}
page "/audit/scheduler/default" type:custom {
use SchedulerDefault
}
API Reference
Generated from the component's exported types.
SchedulerProps
Extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">
| Prop | Type | Default | Description |
|---|---|---|---|
month | Date | — | Controlled visible month. Provide together with `onMonthChange`. |
defaultMonth | Date | — | Initial visible month for the uncontrolled case. Defaults to "today". |
onMonthChange | (month: Date) => void | — | Called with the first day of the next visible month on Prev/Today/Next. |
events | SchedulerEvent[] | [] | Events to lay out across the grid. Bucketed by calendar day. |
onEventClick | (event: SchedulerEvent) => void | — | Fired when an event chip is activated. |
onDayClick | (date: Date) => void | — | Fired when a day cell (not a chip) is activated, with that day's date. |
today | Date | — | The day to highlight as "today". Optional and defaulting to `undefined` so server render and first client paint are deterministic — pass a stable Date (or compute one in an effect) to light up the current day without a hydration mismatch. |
weekStartsOn | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | Locale-aware start of the week (0 = Sunday … 6 = Saturday). Defaults to `0`, matching the Sun…Sat header. |
ariaLabel | string | "Event calendar" | Accessible label for the grid. Defaults to "Event calendar". |
className | string | — | Additional class names merged onto the root. |
children | ReactNode | — | Contents of the component. |
id | string | — | DOM id of the root element. |