React Lightweight Calendar
A small, customizable calendar component for React. Give it an array of objects with ISO 8601 dates and it lays them out in a month, week, day or timeline view. It works for events, bookings, reservations, rentals, orders or anything else that has a date.
Loading calendar…
Features
- Seven views: month, week, week with hours, day, a horizontal day, and two “in place” views that group items by hour. See Views.
- Any date field: position items by
startTime, bycreatedAt, or by an interval likestartTime-endTime. See Data & positioning. - Interactive: callbacks for items, cells, day names, day numbers, hours and color dots. See Interactions.
- Custom rendering: replace the default item or only its text. See Custom rendering.
- Any language: day and month names come from a date-fns locale, with your own date formats. See Localization.
- Themeable: colors, fonts and spacing come from CSS custom properties. See Styling & theming.
- TypeScript: written in TypeScript and ships its type definitions. See TypeScript.
- Small footprint: React 18 or 19 as a peer dependency, plus
date-fnsandclassnames. Ships ESM and CommonJS builds.
Quick start
npm install react-lightweight-calendarimport { useState } from 'react';
import Calendar from 'react-lightweight-calendar';
const events = [
{
id: '1',
title: 'Design review',
startTime: '2025-06-02T09:00:00Z',
endTime: '2025-06-02T10:30:00Z',
},
];
export default function MyCalendar() {
const [currentDate, setCurrentDate] = useState('2025-06-02');
return (
<Calendar
data={events}
currentView="WEEK_TIME"
currentDate={currentDate}
setCurrentDate={setCurrentDate}
activeTimeDateField="startTime-endTime"
/>
);
}The styles are included: importing the component also imports its CSS.
Next steps
Links
- npm: react-lightweight-calendar
- GitHub: jovanjenjic/react-lightweight-calendar
- Example apps: JavaScript and TypeScript , built with Vite, MUI, Formik and Yup
Last updated on