Library / SDK
namespace-ee/react-calendar-timeline avatar
namespace-ee/react-calendar-timeline

react-calendar-timeline 0.30 beta: dayjs, React 18+, and the props you must keep immutable

A modern and responsive react timeline component.

2,164 stars672 forksTypeScriptMIT

At a glance

What is it?
A TypeScript React timeline with groups on the vertical axis and items on a time axis. The 0.30.0 beta changes the date library, the CSS path and the supported React versions, and the stable 0.28.0 line stays on moment.
Who is it for?
Pick react-calendar-timeline when you need rows of groups with items placed on a time axis and you are on React 18 or 19, because the 0.30 beta is the only line that supports them. Stay away if you cannot ship a beta tag or still run React 16 or 17, since 0.28.0 is the stable fallback and it keeps moment.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 7 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • namespace-ee/react-calendar-timeline2,164 ★ · +4
Star history
Repository2026-10-092026-11-25
namespace-ee/react-calendar-timeline2.2k2.2k

4 Stars in the last 47 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Two npm tags: 0.28.0 stable on moment, 0.30.0-beta.19 on dayjs

The repository ships two incompatible lines under one package name. The latest stable release is 0.28.0, installed with a plain `npm install react-calendar-timeline`, and it uses moment.js as its date library. The 0.30.0 line is a beta, and you opt in through the tag:

bash
npm install react-calendar-timeline@beta

The package.json in the repository reads version 0.30.0-beta.19, and the most recent releases are v0.30.0-beta.19 on 2026-07-24, v0.30.0-beta.18 on 2026-03-04 and v0.30.0-beta.17 on 2026-03-02. The last push to the default branch main also landed on 2026-07-24, and the repository is not archived. So the beta is still receiving commits, but it has not left beta: nineteen beta builds in, there is no stable 0.30.0 to point at.

That split matters for documentation. The long API section in the project README describes the beta. If you stay on 0.28.0 you have to read the 0.28.0 README at its tagged version, because prop names and the date library differ between the two. Mixing the two sets of docs is the easiest way to end up passing moment objects into a component that now expects dayjs.

The 0.30 rewrite: TypeScript, Vite, dayjs, and the changes that break a 0.2x app

The beta is a full TypeScript rewrite with bundled type definitions, so the separate `@types/react-calendar-timeline` package is no longer needed. The bundler moved to Vite instead of webpack or rollup, and the build script in package.json is `npm run clean && tsc && vite build`. Tests run through vitest.

Four changes will break an existing 0.2x integration. The date library is dayjs instead of moment, so every date-related call in your own code has to change, and the peer dependency changes with it. The stylesheet import moved from `react-calendar-timeline/lib/Timeline.css` to `react-calendar-timeline/style.css`. React 18 or newer is required, which drops React 16 and 17. And ImmutableJS arrays are no longer accepted, so items and groups must be plain JavaScript arrays.

Other items on the beta list are smaller. There is an optional per-item `height` override for dynamic item sizing, an `itemVerticalGap` timeline prop for consistent spacing, and an externalized dayjs dependency with locale support. Pull requests are linked for redraw behaviour based on the `buffer` prop, start and end of day around daylight saving, `timeSteps` fixes, and dropping new tasks onto the timeline from an external component.

React 19 support is part of the same announcement, which makes this line the only one that covers the current React release.

Four peer dependencies and a stylesheet the component will not run without

react-calendar-timeline does not bundle its own React, DOM renderer, date library or drag handling. It lists react, react-dom, dayjs and interactjs as peer dependencies, so your app installs all four. Installation itself is one of two commands:

bash
# via yarn
yarn add react-calendar-timeline

# via npm
npm install --save react-calendar-timeline

The interactjs peer is the part that surprises people who expected a self-contained widget. Dragging and resizing of items goes through that library, and it is your responsibility to have it in your dependency tree.

The stylesheet is the second trap. The minimal usage example carries a comment that spells out the consequence: include the timeline stylesheet or the timeline will not be styled. The import in the beta is `import 'react-calendar-timeline/style.css'`, which resolves through the package exports map to `./dist/style.css`. The exports map also exposes `./dist/*.scss` and `./dist/*.css`, and the root export offers `sass` and `style` conditions pointing at `./dist/Timeline.scss` and `./dist/Timeline.css`. A project that already compiles Sass can pull the source styles instead of the compiled file.

The package publishes only its `dist` folder, marks itself `sideEffects: false`, and ships both an ES build and a CommonJS build.

Groups are rows, items are blocks, and the minimal example needs only five fields per item

The data model is two arrays. A group is a row on the vertical axis: `id` and `title` are the basics, with an optional `rightTitle` for the right sidebar, an optional `stackItems` flag, and an optional `height` in pixels. The `height` override replaces the calculated row height, and the project points to it as useful for categorized groups.

An item is a block placed on a group at a time range. The minimal item carries `id`, `group`, `title`, `start_time` and `end_time`. Three booleans control interaction per item: `canMove`, `canResize` and `canChangeGroup`. An `itemProps` object is spread onto the root div of the item, so `data-` attributes, `aria-hidden`, an `onDoubleClick` handler, a `className` and inline `style` all land on the element you see.

The smallest working setup, from the project's own usage example, builds its dates from dayjs:

jsx
const groups = [{ id: 1, title: 'group 1' }, { id: 2, title: 'group 2' }]

The field names are configurable through a `keys` prop. Its defaults map `groupIdKey` to `id`, `groupTitleKey` to `title`, `groupRightTitleKey` to `rightTitle`, `itemIdKey` to `id`, `itemTitleKey` to `title`, `itemDivTitleKey` to `title`, `itemGroupKey` to `group` and `itemTimeStartKey` to `start_time`. If your backend already returns `begin` and `finish`, remap the keys instead of reshaping every record.

Date objects work for start_time and end_time, but milliseconds are the fast path

The component accepts two kinds of values for `start_time` and `end_time`. The preferred option is a Unix timestamp in milliseconds, for example `1457902922261`. Objects that convert to a timestamp, meaning a JavaScript `Date` or a `dayjs()` value, also work. The cost is stated plainly: they are a lot slower.

For a handful of items this is irrelevant. For a scheduling view with many rows and many items, every item is converted on every render, so the choice of representation sits in the hot path. Storing numbers in your state and converting only at the edge, when you format a label or open a dialog, keeps the timeline cheap. Converting from dayjs inside the item mapping on each render does the opposite.

There is a second consequence of the beta's dayjs move. The `defaultTimeStart` and `defaultTimeEnd` props expect a Date or dayjs object, while `visibleTimeStart` and `visibleTimeEnd` expect a Unix timestamp in milliseconds. Two pairs of props that look symmetrical take different types. Passing a timestamp to the default pair, or a dayjs object to the visible pair, is a mistake the type definitions are there to catch, which is one practical gain of running the TypeScript rewrite rather than 0.28.0.

Visible range: defaultTime props start it, visibleTime props hand you the scroll handler

A timeline with neither pair of range props does not function. The project states this in a highlighted note: you must provide either `defaultTimeStart` and `defaultTimeEnd`, or `visibleTimeStart` and `visibleTimeEnd`.

The two pairs are different contracts. The default pair sets where the calendar begins and ends, and the component then manages scrolling and zooming itself. The visible pair fixes the exact viewport, and from that point scrolling is orchestrated by your `onTimeChange` function. If you supply `visibleTimeStart` and `visibleTimeEnd` without writing that handler, the user can drag the canvas and nothing moves, because the component has been told you own the viewport. Unless a visible pair overrides them, the default pair is used.

This is the control you want for synchronized views, for example two timelines that should scroll together, or a viewport driven from a URL or a date picker. It costs you a handler and a piece of state. For a read-only chart the default pair is less work and gives up nothing.

The README also ships a section on timeline markers and one on timeline headers, plus a link to example apps in the repository. The top-level layout lists `demo`, `demo-next`, `examples` and `doc` directories, which gives you runnable references before you write your own.

Setting buffer to 1 turns scrolling off, and the default of 3 renders extra canvas on both sides

`buffer` is a number that defaults to 3. It is the amount of extra timeline rendered on the right and left of the visible area. The user scrolls through that extra canvas freely, and only when they get past it does the timeline redraw. A larger buffer means fewer redraws during a drag across the canvas and more elements rendered up front. A smaller buffer does the reverse.

The edge case is documented in one line: setting buffer to 1 disables scrolling on the timeline. That makes `buffer={1}` a switch, not just a tuning value. If someone lowers it to save rendering work and the horizontal scroll stops responding, this is the reason. Anyone searching for why a react calendar timeline will not scroll horizontally should check this prop first, and then check whether they passed `visibleTimeStart` and `visibleTimeEnd` without an `onTimeChange` handler.

The 0.30 beta list includes a pull request that uses the buffer prop to decide when to redraw the canvas, so behaviour around this prop differs between the stable and beta lines. If you tuned `buffer` on 0.28.0, retest the scroll feel after the upgrade rather than assuming the same number gives the same result.

The README points to a section called behind the scenes for the longer explanation of how the redraw works.

The selected prop and immutable arrays: two places where your state takes over

Two props hand control from the component to your app, and both can fail quietly.

The first is `selected`, an array of ids that correspond to `item.id`. By default a click selects one item. If you set `selected`, that default is overwritten and you manage selection yourself. You update the array inside the `onItemSelect` handler and clear it inside `onItemDeselect`. Set the prop and forget a handler, and clicking an item appears to do nothing.

The second is a rule for every prop. The API section opens with a warning: all props need to be immutable. To change the title of one item, pass in a whole new items array instead of editing the title inside the old array. The component compares by reference, so an in-place mutation produces no update. In a React app that already uses reducers or state setters with spread copies, this costs nothing. In an app that mutates a shared list and calls a forceUpdate, the timeline will look frozen while the data is correct.

That rule also explains the ImmutableJS removal in 0.30.0. Plain arrays are required, so a codebase built on Immutable lists needs `toJS()` at the boundary, and the new copy on every conversion works against the performance advice about timestamps.

Editorial conclusion

Pick react-calendar-timeline when you need rows of groups with items placed on a time axis and you are on React 18 or 19, because the 0.30 beta is the only line that supports them. Stay away if you cannot ship a beta tag or still run React 16 or 17, since 0.28.0 is the stable fallback and it keeps moment. Before committing, check that your item and group data can be passed as fresh arrays on every change, because the component expects immutable props.

Frequently asked questions

How can I create a timeline in React with react-calendar-timeline?

Install the package, import the default `Timeline` component and the `react-calendar-timeline/style.css` stylesheet, then pass it `groups` and `items` arrays plus either `defaultTimeStart` and `defaultTimeEnd` or `visibleTimeStart` and `visibleTimeEnd`. Its peer dependencies are react, react-dom, dayjs and interactjs.

Which React calendar library is best, and where does react-calendar-timeline fit?

The repository makes no ranking claim. It describes react-calendar-timeline as a modern and responsive React timeline component, with groups as rows and items placed on a time axis, so it covers timeline and scheduling views rather than a month grid.

What is a UI timeline component in react-calendar-timeline?

It is a component that draws groups as rows and items as draggable or resizable blocks on a horizontal time axis. Each item has `start_time`, `end_time` and a `group`, and `canMove`, `canResize` and `canChangeGroup` control what users can do.

Official sources

  1. Issues
  2. License: MIT
  3. namespace-ee/react-calendar-timeline on GitHub
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/namespace-ee-react-calendar-timeline.svg)](https://hysenlabs.com/projects/namespace-ee-react-calendar-timeline)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/namespace-ee-react-calendar-timeline.svg)](https://hysenlabs.com/projects/namespace-ee-react-calendar-timeline)

Was this useful?