v7.3.0

Quick start guide for React integration

Using an AI coding assistant? Install the Bryntum MCP server to give it access to version-specific Bryntum documentation.

Try React demos

Bryntum Calendar ships with several demo React applications that showcase its functionality. Each demo has been tested and confirmed to be compatible with Node.js 20.

Version requirements

Minimum supported:

  • React: 16.0.0 or higher
  • TypeScript: 3.6.0 or higher (for TypeScript application)
  • Vite 4.0.0 or higher (for application build with Vite)

Recommended:

  • React: 18.0.0 or higher
  • TypeScript: 4.0.0 or higher (for TypeScript application)
  • Vite 5.0.0 or higher (for application build with Vite)

Overview of React integration

This quick start guide will show you how to integrate Bryntum Calendar into your React applications.

To illustrate the integration process, we'll build a simple application that looks like the image below.

Here's a breakdown of the process we'll follow:

  1. Access the Bryntum npm registry
  2. Create a React application
  3. Install the Calendar component
  4. Add the component to the application
  5. Apply styles
  6. Run the application

Access to npm registry

You can try out Bryntum components for free using our public Bryntum trial packages. If you have a Bryntum license, please refer to our Npm Repository Guide to access the private Bryntum repository.

Create a React application

There are many ways to create and build React applications. In this guide, we’ll use the React Vite guide, which is known for its efficiency and performance benefits in development.

If you’re using JavaScript only (without TypeScript), enter the following command:

npm create vite@latest bryntum-calendar-app -- --template react

Alternatively, if you prefer using TypeScript, use the following command:

npm create vite@latest bryntum-calendar-app -- --template react-ts

You can replace bryntum-calendar-app with your preferred application name.

After creating the template, install the Node.js modules:

cd bryntum-calendar-app
npm install && npm install sass

Install the component

From your terminal, update project dependencies using the following commands:

Trial versionLicensed version
npm install @bryntum/calendar@npm:@bryntum/calendar-trial@7.3.0 @bryntum/calendar-react@7.3.0
npm install @bryntum/calendar@7.3.0 @bryntum/calendar-react@7.3.0
If you're using the licensed Bryntum version, ensure that you have configured your npm properly to get access to the Bryntum packages. If not, refer to this guide.

Managing dependencies and versions

The application configuration may add a caret (^) as a prefix to dependency versions. We recommend avoiding the caret character as a version prefix to maintain full control over upgrades.

Check the generated package.json file and, if necessary, replace dependencies and devDependencies with the following:

Trial versionLicensed version
"dependencies": {
  "@bryntum/calendar": "npm:@bryntum/calendar-trial@7.3.0",
  "@bryntum/calendar-react": "7.3.0",
  ...
},
...
"dependencies": {
  "@bryntum/calendar": "7.3.0",
  "@bryntum/calendar-react": "7.3.0",
  ...
},
...

Vite Configuration

If you're using Vite to run Bryntum Calendar in development mode, include the package in the optimizeDeps section of the vite.config.js file to prevent bundles from loading multiple times.

Find instructions for optimizing dependencies in Vite applications here.

Add the component to the application

First, create a configuration file in src. This file will contain the Calendar settings.

CalendarConfig.jsCalendarConfig.ts
const calendarProps = {
    date : new Date(2026, 5, 7),

    crudManager : {
        transport : {
            load : {
                url : 'data.json'
            }
        },
        autoLoad : true
    }
};

export { calendarProps };
import { BryntumCalendarProps } from '@bryntum/calendar-react';

const calendarProps: BryntumCalendarProps = {
    date : new Date(2026, 5, 7),

    crudManager : {
        transport : {
            load : {
                url : 'data.json'
            }
        },
        autoLoad : true
    }
};

export { calendarProps };

Add component data

Now add the following content to public/data.json.

{
  "success": true,
  "resources": {
    "rows": [
      {
        "id": 1,
        "name": "New York Team",
        "eventColor": "blue"
      },
      {
        "id": 2,
        "name": "Tokyo Hub",
        "eventColor": "green"
      },
      {
        "id": 3,
        "name": "Paris Office",
        "eventColor": "orange"
      },
      {
        "id": 4,
        "name": "Sydney Crew",
        "eventColor": "red"
      }
    ]
  },
  "events": {
    "rows": [
      {
        "id": 1,
        "name": "Kickoff Strategy Meeting",
        "startDate": "2026-06-08T09:00:00",
        "endDate": "2026-06-08T12:30:00",
        "resourceId": 1
      },
      {
        "id": 2,
        "name": "Client Review Call",
        "startDate": "2026-06-09T14:00:00",
        "endDate": "2026-06-09T17:00:00",
        "resourceId": 1
      },
      {
        "id": 3,
        "name": "Design Workshop",
        "startDate": "2026-06-10T10:00:00",
        "endDate": "2026-06-10T15:00:00",
        "resourceId": 1
      },
      {
        "id": 4,
        "name": "Project Planning",
        "startDate": "2026-06-08T13:00:00",
        "endDate": "2026-06-08T16:30:00",
        "resourceId": 2
      },
      {
        "id": 5,
        "name": "Sprint Retrospective",
        "startDate": "2026-06-09T15:00:00",
        "endDate": "2026-06-09T19:00:00",
        "resourceId": 2
      },
      {
        "id": 6,
        "name": "Innovation Lab Session",
        "startDate": "2026-06-11T16:00:00",
        "endDate": "2026-06-11T19:30:00",
        "resourceId": 2
      },
      {
        "id": 7,
        "name": "UX/UI Review",
        "startDate": "2026-06-09T08:30:00",
        "endDate": "2026-06-09T11:00:00",
        "resourceId": 3
      },
      {
        "id": 8,
        "name": "Marketing Sync",
        "startDate": "2026-06-10T08:00:00",
        "endDate": "2026-06-10T11:00:00",
        "resourceId": 3
      },
      {
        "id": 9,
        "name": "Team Building Lunch",
        "startDate": "2026-06-12T11:30:00",
        "endDate": "2026-06-12T15:00:00",
        "resourceId": 3
      },
      {
        "id": 10,
        "name": "Daily Standup",
        "startDate": "2026-06-08T09:00:00",
        "endDate": "2026-06-08T12:30:00",
        "resourceId": 4
      },
      {
        "id": 11,
        "name": "Product Demo",
        "startDate": "2026-06-10T16:00:00",
        "endDate": "2026-06-10T20:00:00",
        "resourceId": 4
      },
      {
        "id": 12,
        "name": "Customer Feedback Session",
        "startDate": "2026-06-11T11:00:00",
        "endDate": "2026-06-11T15:30:00",
        "resourceId": 4
      },
      {
        "id": 13,
        "name": "End of Sprint Wrap-up",
        "startDate": "2026-06-12T12:00:00",
        "endDate": "2026-06-12T15:00:00",
        "resourceId": 4
      },
      {
        "id": 100,
        "name": "Hackathon 2026",
        "startDate": "2026-06-08T00:00:00",
        "endDate": "2026-06-15T00:00:00",
        "allDay": true,
        "resourceId": 1,
        "eventColor": "purple"
      },
      {
        "id": 101,
        "name": "Innovation Day",
        "startDate": "2026-06-08T00:00:00",
        "endDate": "2026-06-09T00:00:00",
        "allDay": true,
        "resourceId": 2
      },
      {
        "id": 102,
        "name": "Wellness Retreat",
        "startDate": "2026-06-10T00:00:00",
        "endDate": "2026-06-11T00:00:00",
        "allDay": true,
        "resourceId": 3
      },
      {
        "id": 103,
        "name": "Tech Expo Visit",
        "startDate": "2026-06-11T00:00:00",
        "endDate": "2026-06-12T00:00:00",
        "allDay": true,
        "resourceId": 4
      },
      {
        "id": 104,
        "name": "Team Celebration",
        "startDate": "2026-06-13T00:00:00",
        "endDate": "2026-06-14T00:00:00",
        "allDay": true,
        "resourceId": 1
      }
    ]
  }
}

Next, replace the code in the App.jsx or App.tsx file with the following:

App.jsxApp.tsx
import { BryntumCalendar } from '@bryntum/calendar-react';
import { calendarProps } from './CalendarConfig';
import './App.scss';

function App() {
  return <BryntumCalendar {...calendarProps} />;
}

export default App;
import { FunctionComponent, useRef } from 'react';
import { BryntumCalendar } from '@bryntum/calendar-react';
import { calendarProps } from './CalendarConfig';
import './App.scss';

const App: FunctionComponent = () => {

    const calendar = useRef<BryntumCalendar>(null);

    return (
        <BryntumCalendar
            ref = {calendar}
            {...calendarProps}
        />
    );
};

export default App;

If you plan to use stateful React collections for data binding, please refer to this guide.

Apply styles

Now you can apply styles to the Bryntum Calendar component.

First, delete the index.css file and remove its import from the main.jsx or main.tsx. This will ensure that no unintended styles are applied.

Next, rename App.css to App.scss and replace its contents with the following:

// FontAwesome is used for icons
@import "@bryntum/calendar/fontawesome/css/fontawesome.css";
@import "@bryntum/calendar/fontawesome/css/solid.css";
// Import calendar's structural CSS
@import "@bryntum/calendar/calendar.css";
// Import your preferred Bryntum theme
@import "@bryntum/calendar/svalbard-light.css";

// Giving our calendar some height
#root {
  height: 100vh;
}

This stylesheet imports the Bryntum Calendar structural CSS, the Svalbard theme, and gives the page a two-panel layout, with the scheduler above the utilization view. Bryntum provides five themes with light and dark variants that can be customized.

Learn more about styling your Bryntum Calendar in our style guide.

Run the application

Start the application development server:

npm run dev

You can now access the application in your browser at http://localhost:5173.

Troubleshooting

If you run into issues while setting up your Bryntum Calendar component, refer to our troubleshooting guide for Bryntum Calendar with React.

What to do next?

Make the most of Bryntum Calendar in your application by learning more about advanced customization options and data management techniques.

Advanced integration with React

Explore our comprehensive React guide to learn more about how Bryntum Calendar integrates with React and start customizing your application.

Working with data in Bryntum Calendar

Our guide to data binding explains how data can be bound to the component.

Bryntum components often use multiple data collections and entities.

For a detailed explanation of how these elements interact, see our guide to displaying data in Bryntum Calendar.

Contents