About
A composable calendar widget with month, week, and day layouts that shows events and overflows extra items into a "+N more" link.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Calendar View to your project and fits it to your theme.
Code
How Calendar View is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import {
CalendarView,
CalendarViewHeader,
CalendarViewTitle,
CalendarViewNavigation,
CalendarViewModes,
CalendarViewGrid,
type CalendarViewEvent,
} from "@/components/ui/calendar-view";
function getSampleEvents(): CalendarViewEvent[] {
const now = new Date();
const base = new Date(now.getFullYear(), now.getMonth(), now.getDate());
const at = (dayOffset: number, hour: number, minute = 0) =>
new Date(
base.getFullYear(),
base.getMonth(),
base.getDate() + dayOffset,
hour,
minute,
);
return [
{ id: "1", title: "Team standup", start: at(0, 9, 0) },
{ id: "2", title: "Design review", start: at(0, 10, 0) },
{ id: "3", title: "Product launch", start: base, allDay: true },
{ id: "4", title: "1:1 with Sam", start: at(2, 14, 30) },
{ id: "5", title: "Sprint planning", start: at(5, 11, 0) },
{ id: "6", title: "Client call", start: at(5, 15, 0) },
{ id: "7", title: "Retro", start: at(5, 16, 0) },
];
}
export default function CalendarViewDemo() {
return (
<div className="w-full max-w-2xl">
<CalendarView defaultDate={new Date()} className="w-full">
<CalendarViewHeader>
<CalendarViewTitle />
<div className="flex items-center gap-2">
<CalendarViewNavigation />
<CalendarViewModes />
</div>
</CalendarViewHeader>
<CalendarViewGrid events={getSampleEvents()} />
</CalendarView>
</div>
);
}








