Skip to main content
Version: 1.0.3

Calendar View

The CalendarView component provides a powerful interface for managing events across multiple time scales. It features smooth animations, drag-and-drop support, and a premium aesthetic out of the box.

May 2026
Sun
Mon
Tue
Wed
Thu
Fri
Sat
26
27
28
29
30
1
2
10:30am Q2 Planning Sync
3
4
5
2pm Launch v2.0
3pm Design Review
6
7
8
9
9am Dentist Appointment
10
11
12
13
14
11am Weekly Standup
15
5pm Marketing Campaign Due
1:30pm 1:1 with Alex
10am Quick Catchup
+1 more
16
17
18
19
20
12pm Code Freeze
21
22
23
24
9am Team Offsite
25
26
27
28
10am Performance Reviews
29
30
2pm Investor Update
31
1
2
3
4
5
6

Installation

ignix add component calendar-view-page

Usage

You can use the `CalendarView` by providing an array of events and handling the relevant callbacks.

import { CalendarView, type CalendarEvent } from "@ignix-ui/calendar-view-page";
import { useState } from "react";

const INITIAL_EVENTS: CalendarEvent[] = [
{
id: "1",
title: "Team Standup",
date: new Date(new Date().setHours(10, 0, 0, 0)),
endDate: new Date(new Date().setHours(10, 30, 0, 0)),
type: "meeting",
description: "Daily sync",
location: "Zoom",
attendees: ["Alice", "Bob"],
tags: ["Engineering"],
}
];

export default function MyCalendar() {
const [events, setEvents] = useState<CalendarEvent[]>(INITIAL_EVENTS);

return (
<div className="h-[800px] rounded-xl border overflow-hidden">
<CalendarView
events={events}
defaultView="month"
onEventDrop={(event, newDate, newEndDate) => {
setEvents(prev => prev.map(e =>
e.id === event.id
? { ...e, date: newDate, endDate: newEndDate ?? e.endDate }
: e
));
}}
onEventAdd={(date) => console.log("Add event on", date)}
onEventEdit={(event) => console.log("Edit", event)}
onEventDelete={(event) => setEvents(prev => prev.filter(e => e.id !== event.id))}
/>
</div>
);
}

Features

  • Multiple Views: Switch between Month, Week, and Day views with ease.
  • Drag-and-Drop: Reschedule events by dragging them to new dates or times (Week/Day views).
  • Event Management: Built-in support for clicking, adding, editing, and deleting events.
  • Responsive Design: Automatically adjusts layouts for different screen sizes.
  • Theming: Supports both light and dark modes with a simple prop.
  • Customizable Labels: Fully internationalizable labels for all UI elements.

Props

PropTypeDefaultDescription
eventsCalendarEvent[][]Array of events to display.
loadingbooleanfalseWhether to show the loading skeleton.
defaultViewCalendarViewType'month'The initial view to display.
viewCalendarViewType-Controlled view state.
onViewChange(view: CalendarViewType) => void-Callback when the view is changed.
defaultDateDatetodayThe initial date to show in the calendar.
currentDateDate-Controlled date state.
onNavigate(date: Date) => void-Callback when the user navigates to a new date.
selectedDateDate-The currently selected date (highlighted).
onDateSelect(date: Date) => void-Callback when a date is clicked.
onEventClick(event: CalendarEvent) => void-Callback when an event chip is clicked.
onEventDrop(event, newDate, newEndDate?) => void-Callback when an event is dropped after a drag.
theme'light' | 'dark''light'The visual theme to apply.
labelsCalendarViewLabels-Custom text for buttons and empty states.