Skip to content
プロジェクト

概要

A calendar for React inspired by Notion Calendar, built on shadcn/ui. Day, week and month views with drag, resize, touch and keyboard support.

Web・アプリ開発

この数値の測り方

できること

  • Views: day, week, any number of days from 2 to 9, month, the year as twelve month grids, and an agenda that lists the next 30 days.
  • Direct manipulation: drag events to move them, drag their edges to resize, double-click or drag on empty space to create one. Works with touch too.
  • Real calendar data: overlapping events side by side, all-day and multi-day events, a current-time indicator.
  • Event details: a side panel or popover that matches Notion Calendar's details panel, with inline editing for the time and date, time zone, repeat, participants and rooms, conferencing, location, links and attachments, description, calendar, availability and reminders. Plus a right-click menu.

計測したスター増加

24時間
0
7日間
+6
15日間
+9
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

CalendarCN

A calendar for React inspired by Notion Calendar. Built on shadcn/ui, installed with the shadcn CLI, and yours to edit.

CI MIT License

Live demo · Docs · Roadmap

CalendarCN preview

Features

  • Views: day, week, any number of days from 2 to 9, month, the year as twelve month grids, and an agenda that lists the next 30 days.
  • Direct manipulation: drag events to move them, drag their edges to resize, double-click or drag on empty space to create one. Works with touch too.
  • Real calendar data: overlapping events side by side, all-day and multi-day events, a current-time indicator.
  • Event details: a side panel or popover that matches Notion Calendar's details panel, with inline editing for the time and date, time zone, repeat, participants and rooms, conferencing, location, links and attachments, description, calendar, availability and reminders. Plus a right-click menu.
  • Keyboard first: shortcuts for every view, a command menu, and keyboard move and resize for focused events.
  • Accessible: labeled events, focus rings, and screen reader announcements when an event moves.
  • Configurable: date-fns locale, 12 or 24 hour clock, week start, snap interval and visible hours.
  • Your data, your markup: typed with your own event type, with render slots for event content and details.
  • Theming: light and dark mode with the shadcn/ui CSS variables.

Installation

Like shadcn/ui, CalendarCN isn't an npm package: the shadcn CLI copies the source into your project. In a project that has shadcn/ui, one command adds the full calendar:

npx shadcn@latest add @calendarcn/calendar

The CLI finds the @calendarcn registry by itself, so there's nothing to configure first. Add only the pieces you need instead (week-view, month-view, calendar-core and more), or the whole live demo, sidebars and command menu included, as one block (Calendar App):

npx shadcn@latest add @calendarcn/calendar-app

CalendarCN needs Tailwind CSS 4 and React 19, and works with the Radix and the Base UI versions of the shadcn/ui components. The installation guide covers setup, the requirements and every item.

Working with an AI coding assistant? Every example in the docs has a prompt to copy, and Use with AI sets up the shadcn MCP server and the CalendarCN skill.

Usage

import { Calendar } from "@/components/calendar";
import type { CalendarEvent } from "@/components/calendar-types";

export function MyCalendar({ events }: { events: CalendarEvent[] }) {
  return (
    <div className="h-[600px]">
      <Calendar defaultEvents={events} />
    </div>
  );
}

Or compose your own: wrap DayView, WeekView, MonthView, YearView, AgendaView or TimeGrid in CalendarProvider. The docs have a live example and the API reference for each component.

Development

You'll need Node.js 22+ and pnpm 10+.

git clone https://github.com/vmnog/calendarcn.git
cd calendarcn
pnpm install
pnpm dev

Open localhost:3000 for the demo and localhost:3000/docs for the docs.

Contributing

Contributions are welcome, from typo fixes in the docs to new views. Read the contributing guide to get set up, then look at issues labeled good first issue or open a new one.

Built with

Next.js, React, Tailwind CSS, shadcn/ui, date-fns and Lucide. The docs run on Fumadocs.

License

MIT. Created by Victor Nogueira (@mevmnog).

関連プロジェクトを探す

読み込み中…