npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sajankumarv88/react-calendar

v1.0.2

Published

A beautiful, fully-featured calendar component for React with month, week, day, and year views.

Readme

@sajankumarv88/react-calendar

A beautiful, fully-featured calendar component for React with month, week, day, and year views.

Installation

npm install @sajankumarv88/react-calendar
# or
pnpm add @sajankumarv88/react-calendar

Usage

import { Calendar } from "@sajankumarv88/react-calendar";
import "@sajankumarv88/react-calendar/style.css";

function App() {
  const events = [
    {
      id: "1",
      title: "Team Meeting",
      start: "2026-02-16T10:00:00",
      end: "2026-02-16T11:00:00",
      allDay: false,
      category: "work",
      isBookable: true,
      createdBy: { id: "user1", name: "John Doe" },
    },
  ];

  const handleEventAdd = (event) => {
    console.log("New event added:", event);
    // Handle event addition (e.g., save to database)
  };

  return (
    <div style={{ height: "100vh" }}>
      <Calendar
        initialEvents={events}
        holidays={["2026-12-25", "2026-01-01"]}
        workHours={{ start: 9, end: 17 }}
        theme="light"
        onEventAdd={handleEventAdd}
      />
    </div>
  );
}

Important: Wrap the Calendar in a container with a defined height (e.g., 100vh, 600px) for proper display and scrolling.

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | initialEvents | CalendarEvent[] | Sample events | Initial events to display | | holidays | string[] | [] | ISO date strings for holidays (e.g., ['2026-12-25']) | | workHours | { start: number; end: number } | { start: 9, end: 17 } | Work hours range (24hr format) | | theme | "light" \| "dark" | "light" | Initial theme mode | | onEventAdd | (event: CalendarEvent) => void | - | Callback when an event is added | | enableThemeToggle | boolean | true | Show/hide the theme toggle button |

Features

  • 4 Views — Month, Week, Day, and Year
  • Event Management — Add, view, and delete events
  • Categories — Work, Personal, Holiday, Urgent with color coding
  • Dark Mode — Built-in light/dark theme toggle
  • Responsive — Mobile-friendly with automatic view adjustment
  • Holiday Support — Highlight specific dates as holidays
  • Work Hours — Visual distinction for working hours
  • Overlap Resolution — Smart layout for overlapping events

CalendarEvent Type

interface CalendarEvent {
  id: string;
  title: string;
  description?: string;
  location?: string;
  start: string; // ISO 8601 format (e.g., "2026-02-16T10:00:00")
  end: string; // ISO 8601 format
  allDay: boolean;
  category: "work" | "personal" | "holiday" | "urgent";
  color?: string; // Optional custom color
  isBookable: boolean;
  createdBy: {
    id: string;
    name: string;
    avatar?: string;
  };
  recurrence?: "none" | "daily" | "weekly" | "monthly";
}

Advanced Usage

You can use the useCalendar hook directly for custom implementations:

import { useCalendar } from "@sajanv88/react-calendar";

function MyCalendar() {
  const cal = useCalendar({
    initialEvents: [],
    holidays: ["2026-12-25"],
    workHours: { start: 9, end: 17 },
  });

  // Build your own UI using cal.monthGrid, cal.events, etc.
}

Peer Dependencies

  • react >= 18
  • react-dom >= 18

Contact

License

MIT