React calendar component
Open-Source React Event Calendar
DayFlow is an MIT-licensed calendar component for React. You configure it once through the useCalendarApp hook — views, plugins and events in one object — and render the result. There is no date library to choose and no localizer to assemble before the first render.
- Package
@dayflow/react- Requires
- React 18 or newer
- Licence
- MIT
- Views
- Day, week, month, year, agenda
Add DayFlow to a React app
Install the React adapter, the calendar core and the drag plugin.
npm install @dayflow/react @dayflow/core @dayflow/plugin-dragThe stylesheet is not optional — without @dayflow/core/dist/styles.css the grid renders unstyled. If your app uses Tailwind, import @dayflow/core/dist/styles.components.css instead, which leaves out the CSS reset that would otherwise fight Tailwind's preflight.
This component opens on today with one event you can drag or resize in the time grid.
'use client';
import {
useCalendarApp,
DayFlowCalendar,
createDayView,
createWeekView,
createMonthView,
createEventsPlugin,
} from '@dayflow/react';
import { createDragPlugin } from '@dayflow/plugin-drag';
import { createEvent } from '@dayflow/core';
import '@dayflow/core/dist/styles.css';
export default function TeamCalendar() {
const calendar = useCalendarApp({
views: [createDayView(), createWeekView(), createMonthView()],
plugins: [createDragPlugin(), createEventsPlugin()],
events: [
createEvent({
id: 'team-meeting',
title: 'Team meeting',
start: new Date(2026, 0, 14, 10, 0),
end: new Date(2026, 0, 14, 11, 0),
}),
],
initialDate: new Date(),
});
return <DayFlowCalendar calendar={calendar} />;
}What is specific to React
One import for views and plugins
The React adapter re-exports the view and plugin factories, so createWeekView and createEventsPlugin come from @dayflow/react rather than from the core package. Only the drag plugin and the event helpers are separate imports. The other adapters import the factories from @dayflow/core, so copying a Vue or Svelte snippet into React means adjusting the import lines.
It is a client component
useCalendarApp holds state and reads the DOM, so in the Next.js App Router the file needs 'use client' at the top. Keep the directive on the component that calls the hook, not on the whole page, so the rest of the route can still render on the server.
Map your records once
Events go in through createEvent rather than through accessor props, so there is one adapter function between your API shape and the calendar. That is also the natural place to normalise time zones — see the time zones guide.
Plan the day or scan the whole year
Register only the views you need. The day view suits appointments, the week view a team's schedule, the month view a workload at a glance, and the two year views a whole planning horizon. The same events stay in place as users switch layouts.
Create and adjust events in the grid
Drag across the grid to create an event, move it to reschedule, or resize it to change its duration. The drag plugin reports every change, so your own scheduling rules decide what is allowed before anything is saved.
Add only what you use
Behaviour arrives as plugins rather than configuration flags, so nothing you skip ends up in the bundle.
- Drag and drop — Move, resize and drag-to-create events.
- Localization — Locale-aware labels, formats and week starts.
- Keyboard shortcuts — Navigate and edit without the mouse.
- Sidebar — Mini calendar and calendar list beside the grid.
- Board — A board view over the same event data.
- CalDAV sync — Two-way sync with Google and Outlook.
Coming from another React calendar
Porting from react-big-calendar is mostly mechanical: views become create*View() entries, the withDragAndDrop higher-order component becomes the drag plugin, and the accessor props collapse into one mapping function. There is no localizer step at all. Porting from FullCalendar trades its plugin array for this one, and its premium resource views for separate modules. Both have an option-by-option mapping: react-big-calendar comparison · FullCalendar comparison.
When dates are not the main axis
If your users ask “who is assigned, and when?” rather than “what is happening on this date?”, a calendar is the wrong primitive:
- DayFlow Pro — Resource timelines, resource grids, appointment booking and print-ready output, layered on the same core.
- DayFlow Scheduler — A standalone resource-first scheduler for rows of people, crews or equipment with time running across them.
React calendar questions
Is the React calendar free to use?
Yes. @dayflow/react, @dayflow/core and the plugins used on this page are MIT licensed, including the day, week, month, year and agenda views. Resource timelines, resource grids, appointment booking and print output are separate paid modules.
Does it work with Next.js and the App Router?
Yes. The component that calls useCalendarApp needs the ‘use client’ directive, since the hook holds state and reads the DOM. Everything else in the route can stay a server component.
Do I need Moment, date-fns or another date library?
No. DayFlow has no date-library peer dependency and no localizer to configure. You pass JavaScript Date objects to createEvent, and locale-specific formatting is handled by the localization plugin.
Which React versions are supported?
React 18 or newer, including React 19. The adapter declares react and react-dom as peer dependencies, so it uses the copy already in your app.
How do I control the calendar height?
The calendar fills the width of its container and takes its height from the --df-calendar-height custom property on .df-calendar-container. Set it to a fixed value, a viewport unit, or anything else CSS accepts. The theme customization guide covers the rest of the token surface.
Next steps
- Getting started — install and render your first calendar.
- Views — every view type and its options.
- Theme customization — tokens, dark mode and Tailwind integration.
- Live demo — try the interactions before installing anything.