Start hereApplies toSuperScheduler Lite
Quick start with Lite
In short
Run npm install super-scheduler-lite, import SuperSchedulerComponent and super-scheduler-lite/styles.css, and pass startDate, days, resources and events. Lite renders a read-only, virtualized timeline with day, hour, minute or custom cells and reports clicks through callbacks; turn on its handling options and people move and resize events and select time ranges with the mouse. It throws for any option it does not implement. Lite is free for noncommercial use; commercial use requires Pro.
On this page
SuperScheduler Lite is the public edition on npm: one row per resource, time across in days, hours or minutes, events as bars that people can move and resize once you allow it, and every click and change reported to your code. It is the fastest way to put an occupancy board or a booking timeline in a React application. This guide takes you from an empty project to a working timeline, then covers every option, the gestures, the callbacks, the imperative API and what Lite deliberately rejects.
Lite is free for personal and other noncommercial use, and any company may evaluate it for less than 32 consecutive days. Using it in or for a commercial product or service requires a Pro subscription for each developer: see the license and pricing. Validation while dragging, zoom, resource trees, links, history and the other planning modules also belong to Pro: see Install SuperScheduler Pro and Migrate from Lite to Pro.
Requirements
- React 18.2 or later, or React 19. React is a peer dependency, so Lite uses your application's copy.
- A bundler or framework that understands ES modules or CommonJS (Vite, Next.js, webpack, Parcel and similar). Both formats and their TypeScript declarations ship in the package.
- A browser environment to render. The package can be imported during server rendering; the timeline itself is built in the browser when the component mounts.
Install the package
npm install super-scheduler-lite react react-domreact-dom is listed because you render with it, not because Lite imports it.
Render a first timeline
import { SuperSchedulerComponent } from 'super-scheduler-lite'
import type { SuperScheduler } from 'super-scheduler-lite'
import 'super-scheduler-lite/styles.css'
// Module-level arrays keep the same identity on every render, so React never re-applies them.
const ROOMS: SuperScheduler.ResourceData[] = [
{ id: 'r101', name: 'Room 101' },
{ id: 'r102', name: 'Room 102' },
{ id: 'r103', name: 'Room 103' },
]
const BOOKINGS: SuperScheduler.EventData[] = [
// Date-only values: the bar covers 2, 3 and 4 October (the end is exclusive).
{ id: 1, resource: 'r101', start: '2026-10-02', end: '2026-10-05', text: 'Booking 1042' },
// Overlaps the first booking on the same row: Lite stacks it on a second line.
{
id: 2,
resource: 'r101',
start: '2026-10-04',
end: '2026-10-07',
text: 'Booking 1043',
backColor: '#dbeafe',
},
// Times are kept: the bar starts at 14:00 and ends at 11:00, inside the day cells.
{
id: 3,
resource: 'r103',
start: '2026-10-06T14:00:00',
end: '2026-10-09T11:00:00',
text: 'Booking 1051',
},
]
export function Planning() {
return (
<SuperSchedulerComponent startDate="2026-10-01" days={31} resources={ROOMS} events={BOOKINGS} />
)
}You should see a 400-pixel-tall grid with a header of day labels (1 Oct, 2 Oct, …), three room rows and three bars. Booking 1042 covers 2, 3 and 4 October: the end date is exclusive, so a stay that ends on 2026-10-05 is gone at midnight of the 5th. Booking 1043 overlaps it, so Room 101 grows to two lines and stacks both bars. Booking 1051 starts at 14:00 on the 6th and ends at 11:00 on the 9th: Lite places bars at their exact times inside the cells.
Scroll the grid in any direction. Only the rows, cells and events in view exist in the DOM, and scrolling never causes a React render, whatever the size of your data. The timeline starts read-only: moving, resizing and selecting stay off until you turn them on, as Move, resize and select shows.
Import the styles
Import super-scheduler-lite/styles.css once, typically in your entry file or root layout. The rules live in a CSS cascade layer named super-scheduler, so any unlayered rule in your own stylesheet overrides them without !important.
The root element has the class super-scheduler-lite and seven custom properties. Override them on that class (not on a distant ancestor, because the root declares its own values):
.super-scheduler-lite {
--super-scheduler-background: #ffffff;
--super-scheduler-text: #18212f;
--super-scheduler-border: #dce3ed;
--super-scheduler-header: #f4f7fb;
--super-scheduler-event: #d7e8fa;
--super-scheduler-focus: #005cbf;
/* Fill of the selected range and of the drop preview while dragging. */
--super-scheduler-selection: rgb(0 92 191 / 0.14);
}
/* A dark theme driven by your own class on <html>. */
.dark .super-scheduler-lite {
--super-scheduler-background: #121518;
--super-scheduler-text: #f4f4f5;
--super-scheduler-border: #2b3139;
--super-scheduler-header: #1b1f24;
--super-scheduler-event: #1f3a5c;
}Lite sets its own font (13 px system UI) and fills the width of its parent. Per-event colors come from the data (backColor, fontColor) or from a cssClass you style yourself.
Options and defaults
Every option Lite accepts is in this table. Anything else throws (see What Lite rejects).
| Option | Type | Default | Notes |
|---|---|---|---|
startDate | ISO string or SuperScheduler.Date | Today | The first day; a time of day is ignored |
days | positive integer | 31 | Length of the timeline in days |
scale | 'Day', 'Hour', 'Minute' or 'CellDuration' | 'Day' | The length of one cell; see Hours and minutes |
cellDuration | positive integer (minutes) | 60 | Length of one cell when scale is 'CellDuration' |
cellWidth | number (px) | 64 | Width of one cell |
height | number (px) | 400 | Total height of the scrolling box, header included |
rowHeaderWidth | number (px) | 160 | Width of the resource name column |
rowMinHeight | number (px) | 40 | Rows grow when overlapping events stack |
eventHeight | number (px) | 26 | Height of one event line |
resources | ResourceData[] | [] | { id, name }, flat |
events | EventData[] | [] | See Event fields |
locale | string | 'en-us' | Day and time labels in the header, such as es-es or de-de |
ariaLabel | string | 'Resource schedule' | Accessible name of the grid, also shown in the top-left corner |
emptyState | string | 'No resources' | Text shown when resources is empty |
eventMoveHandling | 'Update', 'Notify' or 'Disabled' | 'Disabled' | Dragging events to another time or row |
eventResizeHandling | 'Update', 'Notify' or 'Disabled' | 'Disabled' | Dragging the start or end edge of events |
timeRangeSelectedHandling | 'Enabled' or 'Disabled' | 'Disabled' | Selecting empty cells by dragging or clicking |
onEventClick, onTimeRangeClick | function | none | See Respond to clicks |
onEventMove, onEventMoved | function | none | See Move, resize and select |
onEventResize, onEventResized | function | none | See Move, resize and select |
onTimeRangeSelect, onTimeRangeSelected | function | none | See Move, resize and select |
Numeric options must be positive and finite, and days and cellDuration must be integers.
Hours and minutes
days always sets the length of the timeline, from startDate at midnight; scale sets the length of one cell. 'Day' gives one cell per day, 'Hour' one per hour, 'Minute' one per minute, and 'CellDuration' one per cellDuration minutes (15, 30, 90, 1440…).
import { SuperSchedulerComponent } from 'super-scheduler-lite'
import type { SuperScheduler } from 'super-scheduler-lite'
const ROOMS: SuperScheduler.ResourceData[] = [
{ id: 'c1', name: 'Consulting room 1' },
{ id: 'c2', name: 'Consulting room 2' },
]
const APPOINTMENTS: SuperScheduler.EventData[] = [
{
id: 'a1',
resource: 'c1',
start: '2026-10-05T09:15:00',
end: '2026-10-05T10:00:00',
text: 'Check-up',
},
{
id: 'a2',
resource: 'c2',
start: '2026-10-05T11:30:00',
end: '2026-10-05T12:00:00',
text: 'Follow-up',
},
]
/** One day of 15-minute cells: day labels above, time labels in the locale's clock below. */
export function ClinicDay() {
return (
<SuperSchedulerComponent
startDate="2026-10-05"
days={1}
scale="CellDuration"
cellDuration={15}
cellWidth={48}
locale="en-gb"
resources={ROOMS}
events={APPOINTMENTS}
/>
)
}You should see one day of 15-minute cells under two header rows: the day label, which stays next to the row headers while you scroll through its hours, and the time of each cell in the locale's clock (09:15 here, 9:15 AM with en-us). Cells of a day or more show a single row of d MMM labels instead.
The whole timeline must fit in 16 million pixels (days × cells per day × cellWidth): a year of one-minute cells does not, so use larger cells or fewer days. Week, month and year cells, custom header rows (timeHeaders), zoom and hidden nights or weekends are Pro features; see Hours, minutes, days and zoom.
Event and resource fields
A resource is { id, name }. An event has five required fields and five optional ones:
| Field | Required | Meaning |
|---|---|---|
id | yes | String or finite number, unique among events |
resource | yes | The id of the row it belongs to, with the same type |
start, end | yes | ISO strings (2026-10-02 or 2026-10-02T14:00:00, seconds included) or SuperScheduler.Date; end is exclusive |
text | yes | The label, rendered as text (never as HTML) |
backColor, fontColor | no | Any CSS color |
cssClass | no | Extra class names on the event button |
toolTip | no | Native tooltip; defaults to text |
tags | no | Any value you want back in the callbacks |
Ids are compared strictly: 1 and '1' are different ids, so an event with resource: '101' does not appear on a row with id: 101. Dates are civil wall-clock values with no time zone; the data model guide explains the rules, which are the same in both editions.
Respond to clicks
onEventClick receives { control, e, originalEvent }, where e.data is your event object. onTimeRangeClick receives { control, start, end, resource, originalEvent } for a click on an empty cell; start is the start of that cell and end the start of the next one, both as SuperScheduler.Date.
import { useCallback, useState } from 'react'
import { SuperSchedulerComponent } from 'super-scheduler-lite'
import type {
SchedulerEventClickArgs,
SchedulerTimeRangeClickArgs,
SuperScheduler,
} from 'super-scheduler-lite'
interface PlanningProps {
readonly rooms: SuperScheduler.ResourceData[]
readonly bookings: SuperScheduler.EventData[]
}
export function PlanningWithDetails({ rooms, bookings }: PlanningProps) {
const [detail, setDetail] = useState('Select a booking or a free day.')
// Stable callbacks: a new function per render would be sent to the control on every render.
const onEventClick = useCallback((args: SchedulerEventClickArgs) => {
// Lite hands you the event's own data object, including `tags`.
setDetail(`${args.e.data.text} (id ${String(args.e.data.id)})`)
}, [])
const onTimeRangeClick = useCallback((args: SchedulerTimeRangeClickArgs) => {
// One day cell: `end` is the next midnight. Enter and Space on the active cell also land here.
setDetail(`Free cell: ${String(args.resource)} on ${args.start.toString('d MMMM yyyy')}`)
}, [])
return (
<>
<p aria-live="polite">{detail}</p>
<SuperSchedulerComponent
startDate="2026-10-01"
days={31}
resources={rooms}
events={bookings}
onEventClick={onEventClick}
onTimeRangeClick={onTimeRangeClick}
/>
</>
)
}You should see the paragraph change when you click a booking or a free cell. The same callbacks run from the keyboard: Tab focuses the grid, the arrow keys move the active cell, and Enter or Space on it calls onTimeRangeClick; events are buttons, so Enter on a focused event calls onEventClick. originalEvent is the DOM event behind the call: the KeyboardEvent when Enter or Space activated a cell, a click event otherwise. When selection is on, a click on a cell also selects it (see below).
Move, resize and select
The three gestures are off by default, so a timeline built with Lite 1.1 stays read-only after an update. Turn them on with eventMoveHandling: 'Update', eventResizeHandling: 'Update' and timeRangeSelectedHandling: 'Enabled'; then people can:
- move an event by dragging it to another time or row. It moves by whole cells and keeps its time inside the cell, so a 14:00 check-in moved two days later still starts at 14:00;
- resize an event by dragging its start or end edge. The edge snaps to cell boundaries and never crosses the cell where the other edge is;
- select a time range by dragging across empty cells of one row, or by clicking a cell. The selection stays on screen until the next one,
clearSelection()or an update of the data.
The grid scrolls by itself when the pointer nears its edges, and Escape cancels a drag in progress. Gestures use a mouse or a pen; on touch screens the grid keeps scrolling natively.
Each gesture calls two callbacks with the same argument object. The first (onEventMove, onEventResize, onTimeRangeSelect) can cancel it with args.preventDefault(), and for moves and resizes it can change args.newStart, args.newEnd or args.newResource. The second (onEventMoved, onEventResized, onTimeRangeSelected) reports what happened.
| Callbacks | Arguments |
|---|---|
onEventMove, onEventMoved | control, e.data, newStart, newEnd, newResource, ctrl, shift, meta, preventDefault() |
onEventResize, onEventResized | control, e.data, newStart, newEnd, what ('start' or 'end'), preventDefault() |
onTimeRangeSelect, onTimeRangeSelected | control, start, end, resource, origin ('click' or 'drag'), preventDefault() |
e.data is your event object as it was before the gesture: Lite never modifies your objects. With 'Update' or 'Notify', Lite draws the event at its new place from its own copy, then calls the second callback. Write the change to your state there, so the next render passes the new data back:
import { useCallback, useState } from 'react'
import { SuperSchedulerComponent } from 'super-scheduler-lite'
import type {
SchedulerEventMoveArgs,
SchedulerEventMovedArgs,
SchedulerEventResizedArgs,
SchedulerTimeRangeSelectedArgs,
SuperScheduler,
} from 'super-scheduler-lite'
interface PlanningProps {
readonly rooms: SuperScheduler.ResourceData[]
readonly initialBookings: SuperScheduler.EventData[]
}
export function EditablePlanning({ rooms, initialBookings }: PlanningProps) {
const [bookings, setBookings] = useState(initialBookings)
// Before the drop is applied: a rule of your own can cancel it or change the target.
const onEventMove = useCallback((args: SchedulerEventMoveArgs) => {
if (args.newResource === 'r999') args.preventDefault()
}, [])
// After the drop: `e.data` is the event as it was; write the new values to your state.
const onEventMoved = useCallback((args: SchedulerEventMovedArgs) => {
const { id } = args.e.data
setBookings((list) =>
list.map((item) =>
item.id === id
? {
...item,
start: args.newStart.value,
end: args.newEnd.value,
resource: args.newResource,
}
: item,
),
)
}, [])
const onEventResized = useCallback((args: SchedulerEventResizedArgs) => {
const { id } = args.e.data
setBookings((list) =>
list.map((item) =>
item.id === id ? { ...item, start: args.newStart.value, end: args.newEnd.value } : item,
),
)
}, [])
// A range dragged across empty cells becomes a new booking.
const onTimeRangeSelected = useCallback((args: SchedulerTimeRangeSelectedArgs) => {
if (args.origin !== 'drag') return
const text = window.prompt('New booking')
args.control.clearSelection()
if (!text) return
setBookings((list) => [
...list,
{
id: crypto.randomUUID(),
resource: args.resource,
start: args.start.value,
end: args.end.value,
text,
},
])
}, [])
return (
<SuperSchedulerComponent
startDate="2026-10-01"
resources={rooms}
events={bookings}
// The gestures are off by default: turn on the ones this screen needs.
eventMoveHandling="Update"
eventResizeHandling="Update"
timeRangeSelectedHandling="Enabled"
onEventMove={onEventMove}
onEventMoved={onEventMoved}
onEventResized={onEventResized}
onTimeRangeSelected={onTimeRangeSelected}
/>
)
}You should be able to drag a booking to another room, stretch its end by a day, and drag across free cells to create a booking. A drop onto the row r999 is refused by onEventMove and the booking returns to where it was.
Leave a handling option at 'Disabled' to keep that gesture off; with all three disabled, the default, Lite is a read-only timeline that still reports clicks.
Control the timeline from code
The React component creates a control when it mounts and disposes it when it unmounts. Reach it through ref.current.control on the component, or with the controlRef prop (a ref object or a callback; Lite sets it to null on unmount).
import { useRef } from 'react'
import { SuperScheduler, SuperSchedulerComponent } from 'super-scheduler-lite'
interface PlanningProps {
readonly rooms: SuperScheduler.ResourceData[]
readonly bookings: SuperScheduler.EventData[]
}
export function NavigablePlanning({ rooms, bookings }: PlanningProps) {
// Lite sets `current` after mount and clears it on unmount.
const controlRef = useRef<SuperScheduler.Scheduler | null>(null)
const goToToday = () => controlRef.current?.scrollTo(SuperScheduler.Date.today())
const findRoom = (id: SuperScheduler.ResourceData['id']) =>
controlRef.current?.scrollToResource(id)
const logRange = () => {
const control = controlRef.current
if (control !== null)
console.info(`${control.visibleStart().value} to ${control.visibleEnd().value}`)
}
return (
<>
<div role="toolbar" aria-label="Planning navigation">
<button type="button" onClick={goToToday}>
Today
</button>
<button type="button" onClick={() => findRoom('r310')}>
Room 310
</button>
<button type="button" onClick={logRange}>
Visible range
</button>
</div>
<SuperSchedulerComponent
controlRef={controlRef}
startDate="2026-10-01"
days={92}
height={520}
resources={rooms}
events={bookings}
/>
</>
)
}The Lite control has these members:
| Member | What it does |
|---|---|
update(options) | Merges options into the current ones and redraws. An explicit undefined restores a default |
scrollTo(date) | Scrolls so date is at the left edge |
scrollToResource(id) | Scrolls so that row is at the top |
visibleStart(), visibleEnd() | The dates at the left and right edges of the scrolled view |
clearSelection() | Removes the selected time range, without calling any callback |
disposed() | Whether dispose() has run |
dispose() | Removes the DOM, listeners and observers and releases the data |
init() | Builds the DOM; the React component calls it for you |
Without React, create the control on an element you own:
import { SuperScheduler } from 'super-scheduler-lite'
import 'super-scheduler-lite/styles.css'
/** Mounts a planning into `host` without React and returns its teardown. */
export function mountPlanning(host: HTMLElement): () => void {
const control = new SuperScheduler.Scheduler(host, {
startDate: '2026-10-01',
days: 31,
resources: [
{ id: 'r101', name: 'Room 101' },
{ id: 'r102', name: 'Room 102' },
],
events: [
{ id: 1, resource: 'r101', start: '2026-10-02', end: '2026-10-05', text: 'Booking 1042' },
],
onEventClick: ({ e }) => console.info('booking', e.data.id),
})
control.init()
// update() merges with the current options; an explicit undefined restores a default.
control.update({ days: 62, cellWidth: 48 })
control.scrollTo('2026-10-15')
return () => control.dispose()
}Update the data
The component sends only changed props to control.update(), comparing them by identity. To change the data, pass a new array: setEvents([...events, next]) works, while events.push(next) on the same array does not reach the timeline until you call control.update() yourself. Updates that only change callbacks swap them without redrawing.
After a move or a resize, Lite draws from its own updated copy of the events until you pass new events; an update with new events replaces that copy. Your arrays and objects are never modified.
What Lite rejects
Lite validates its input and throws instead of ignoring what it cannot do, so a misconfiguration surfaces during development rather than as a half-working screen:
- An option outside the table above, including Pro options such as
allowEventOverlaporzoomLevels, even when passed from plain JavaScript:SuperScheduler Lite: unsupported option "zoomLevels". - A
scaleLite does not have, such as'Week'or'Month'(scale "Week" requires Pro), and a handling value it does not have, such as'CallBack'. - A timeline wider than 16 million pixels.
- A resource with
children,frozen,splitorcolumns(resource children requires Pro). - Duplicate resource ids, ids that are not strings or finite numbers, and events whose
endis before theirstart. - Non-positive or non-finite sizes, and a fractional
daysorcellDuration.
When update() throws, the previous configuration stays on screen and usable. In React the error is thrown while the component commits the new props, so an error boundary above it catches it.
Next steps
- Understand the data rules shared by both editions: Resources, events and intervals.
- Embed the component correctly in a larger React app: React integration.
- See what a full planning product looks like in the examples, all built with Pro.
- When you need rules while dragging, zoom or trees, or use the scheduler commercially: Migrate from Lite to Pro.