Birch UI v0.1
Pricing

Scheduler overviewScheduler

A resource timeline for planning people, crews, rooms and equipment, with drag and drop, resizing, drag-to-create, zoom presets, working time and time zones.

Open .md

Birch UI Scheduler is a resource timeline. Resources (field technicians, installation crews, meeting rooms, vehicles) are listed down the left side, time runs left to right, and each event is a bar in its resource's row. Dispatchers drag jobs between people, stretch them to change the duration, and drag across empty time to book new work.

It is built on the same vanilla TypeScript engine as BirchUI Grid, so it has no framework dependency, renders only what is on screen in both directions, and follows the same widget contract as every other Birch UI component.

Field service schedule

Loading demo…

View source

Sample data and small UI helpers are imported from the docs' demos/_shared.ts and demos/_scheduler-data.ts files.

demos/scheduler-basic.ts
import { createScheduler, type ViewPresetName } from '@birchui/scheduler';
import { docsTheme, field, layout, onDocsThemeChange, button } from './_shared';
import { WEEK_START, at, serviceJobs, technicians, type ServiceJob, type Technician } from './_scheduler-data';

export const meta = { title: 'Field service schedule', height: 460 };

const PRESETS: ViewPresetName[] = ['hourAndDay', 'dayAndWeek', 'weekAndMonth', 'monthAndYear'];

export default function mount(el: HTMLElement): () => void {
  const { toolbar, body, status } = layout(el);
  const preset = document.createElement('select');
  for (const name of PRESETS) preset.add(new Option(name, name, name === 'hourAndDay', name === 'hourAndDay'));

  const end = new Date(WEEK_START);
  end.setDate(end.getDate() + 7);
  const scheduler = createScheduler<ServiceJob, Technician>(body, {
    resources: technicians,
    events: serviceJobs(),
    start: WEEK_START,
    end,
    viewPreset: 'hourAndDay',
    resourceColumns: [
      { field: 'name', header: 'Technician', width: 170 },
      { field: 'skill', header: 'Skill', width: 140 },
    ],
    workingTime: { days: [1, 2, 3, 4, 5], startHour: 8, endHour: 18 },
    readOnly: true,
    theme: docsTheme(),
    height: '100%',
    ariaLabel: 'Field service schedule',
  });

  const onPreset = () => scheduler.setViewPreset(preset.value as ViewPresetName);
  preset.addEventListener('change', onPreset);
  toolbar.append(
    field('View', preset),
    button('Zoom in', () => scheduler.zoomIn()),
    button('Zoom out', () => scheduler.zoomOut()),
    button('Monday 08:00', () => scheduler.scrollToDate(at(0, 8), 'start')),
  );
  const offs = [
    scheduler.on('eventClick', ({ event }) => {
      status.textContent = `${event.title} for ${event.customer}`;
    }),
    scheduler.on('viewPresetChanged', ({ preset: next }) => {
      status.textContent = `View preset: ${typeof next === 'object' && 'name' in next ? String(next.name) : 'custom'}`;
    }),
  ];
  status.textContent = 'Click a job to see its customer.';
  const stopTheme = onDocsThemeChange((theme) => scheduler.update({ theme }));
  return () => {
    preset.removeEventListener('change', onPreset);
    for (const off of offs) off();
    stopTheme();
    scheduler.destroy();
  };
}

What it does#

  • Resource rows with optional hierarchy: group technicians under depots or rooms under floors with parentId, and collapse or expand groups.
  • Time axis presets from 15-minute ticks to whole months, with two-row headers, zoomIn() and zoomOut(), and fully custom presets.
  • Drag, resize and drag-to-create with snapping to minutes or to ticks, plus validateDrop and validateResize hooks to reject moves your business rules do not allow.
  • Overlap handling: events that overlap in one row are laid out in lanes.
  • Working time: non-working hours and days are shaded, and a "now" line marks the current time.
  • Time zones: the whole timeline is computed in an IANA time zone through Intl, so a dispatcher in Chicago can plan a crew in Berlin on Berlin time, with correct daylight saving transitions.
  • Virtualization of rows and time, so thousands of resources and long ranges stay fast.
  • Keyboard and screen reader support for selecting, moving, resizing and removing events.

Install#

Terminal
npm install @birchui/scheduler

The package depends on @birchui/core and @birchui/license, which npm installs for you. Styles are injected automatically the first time a scheduler is created. If your Content Security Policy blocks inline styles, set injectStyles: false and import the stylesheet instead:

TypeScript
import '@birchui/scheduler/styles.css';

See Installation for bundler notes that apply to every Birch UI package.

Create a scheduler#

createScheduler(container, options) renders into an element you own and returns the scheduler API. The required options are resources plus the visible range, start and end.

dispatch-board.ts
import { createScheduler } from '@birchui/scheduler';

const container = document.querySelector<HTMLElement>('#dispatch-board')!;

const scheduler = createScheduler(container, {
  resources: [
    { id: 'tech-amira', name: 'Amira Haddad' },
    { id: 'tech-jonas', name: 'Jonas Weber' },
    { id: 'tech-lucia', name: 'Lucía Romero' },
  ],
  events: [
    {
      id: 'job-4471',
      resourceId: 'tech-amira',
      title: 'Boiler service, Harbor View Apartments',
      start: '2026-12-07T08:00',
      end: '2026-12-07T10:30',
    },
    {
      id: 'job-4472',
      resourceId: 'tech-jonas',
      title: 'Heat pump install, Ortega residence',
      start: '2026-12-07T09:00',
      end: '2026-12-07T15:00',
      color: '#0f766e',
    },
    {
      id: 'job-4475',
      resourceId: 'tech-lucia',
      title: 'Annual inspection, Northgate Clinic',
      start: '2026-12-07T13:00',
      end: '2026-12-07T14:30',
    },
  ],
  start: '2026-12-07T06:00',
  end: '2026-12-07T20:00',
  viewPreset: 'hourAndDay',
  timeZone: 'America/Chicago',
  workingTime: { days: [1, 2, 3, 4, 5], startHour: 8, endHour: 17 },
  height: 420,
});

scheduler.on('eventDrop', ({ event, start, end, resourceId }) => {
  console.info(`${event.title} moved to ${resourceId}, ${start.toISOString()} to ${end.toISOString()}`);
});

Strings such as '2026-12-07T08:00', with no offset, are read as wall-clock time in the scheduler's timeZone. You can also pass Date objects or epoch milliseconds. Resources and events covers the rules.

The widget contract#

Every Birch UI component, the scheduler included, returns an object with the same four members. Framework adapters are thin wrappers around this contract.

Member What it does
element The root element the scheduler rendered.
update(partial) Applies only the options you pass, without recreating the scheduler.
on(event, listener) Subscribes to an event and returns an unsubscribe function. Payloads are always objects.
destroy() Removes the DOM and releases every listener, observer and timer.
TypeScript
scheduler.update({ viewPreset: 'dayAndWeek', start: '2026-12-07', end: '2026-12-14' });

const stop = scheduler.on('eventClick', ({ event, resource }) => {
  openJobPanel(event.id, resource?.name);
});

stop();
scheduler.destroy();

Beyond the contract, the API has methods for data (setEvents, addEvent, updateEvent, removeEvent, setResources), navigation (setRange, zoomIn, zoomOut, scrollToDate, scrollToEvent) and selection. The API and events page lists them all.

Activate your license#

Set the key once, before the first scheduler is created, or pass it per instance:

TypeScript
import { setLicenseKey } from '@birchui/license';

setLicenseKey(import.meta.env.VITE_BIRCHUI_LICENSE);
TypeScript
createScheduler(container, { ...options, licenseKey: 'LQ1.…' });

Keys are verified offline in the browser. Nothing is sent over the network, and a paid key never expires. See Licensing and activation for seat rules and the watermark.

Use it in your framework#

Each framework adapter ships the scheduler from a /scheduler subpath, so apps that only use the grid never load scheduler code.

Each example renders the same board, a working week of service jobs, and saves a job when it is dragged. resources, jobs and saveJob are your own data and persistence function.

TypeScript
import { createScheduler } from '@birchui/scheduler';

const scheduler = createScheduler(document.getElementById('dispatch-board')!, {
  resources,
  events: jobs,
  start: '2026-12-07',
  end: '2026-12-12',
  viewPreset: 'dayAndWeek',
  height: 480,
});

scheduler.on('eventDrop', ({ event, start, end, resourceId }) => saveJob(event.id, { start, end, resourceId }));

Notes per adapter:

  • React and Solid: options are props, events are on… props, and ref gives you the SchedulerApi.
  • Vue: pass options as attributes (kebab-case names are converted to camelCase) or as an options object; attributes win. Events are kebab-case (@event-drop, @viewport-scroll). The component exposes api.
  • Angular: resources, events, start, end, viewPreset, theme and licenseKey are inputs; everything else goes in [options]. Scheduler events are outputs of the same name, such as (eventDrop) and (rangeChanged), and the api property returns the SchedulerApi.
  • Svelte: every option is a prop, events are on… props, and bind:api gives you the SchedulerApi. Prefer the birchScheduler action, also exported from @birchui/svelte/scheduler, when you want to attach the scheduler to your own element.
  • Web Component: <birchui-scheduler> has no per-option properties or attributes. Assign the whole options object (or call set(key, value) for one key) and listen for kebab-case CustomEvents with the payload in detail. Because the scheduler is created as soon as the element is connected and has options, set resources, start and end together in one options assignment. Give the element display: block or a height in CSS.

The /scheduler entry points are the only code that imports @birchui/scheduler, so grid-only apps never load it. See Using the Scheduler in your framework for SSR notes and complete examples.

Next steps#

↑ ↓ to move, Enter to open, Esc to close