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

customized-calendar

v1.0.0

Published

A modern, customizable calendar component built with React, TypeScript, and FullCalendar

Readme

Customized Calendar Component

A modern, elegant, and highly customizable calendar component built with React, TypeScript, and FullCalendar. Perfect for any application that needs a beautiful, flexible calendar interface.

Features

Modern Design

  • Clean, elegant UI with gradient accents
  • Responsive layout for all screen sizes
  • Customizable theme colors
  • Smooth animations and transitions

📅 Multiple Views

  • Month view
  • Week view
  • Day view

🎯 Event Management

  • Color-coded events by type (SESSION, EVENT, EXAM, HOLIDAY)
  • Batch information display
  • Drag & drop support
  • Event resizing
  • Click to view/edit events

📚 Batch Support

  • Display batch information for each event
  • Group events by batch
  • Batch-specific filtering

🎨 Customizable

  • Theme color support
  • Custom event colors
  • Flexible styling with Tailwind CSS

Installation

NPM Package (Recommended)

npm install customized-calendar
# or
yarn add customized-calendar

Note: This component uses Tailwind CSS classes. Make sure Tailwind CSS is configured in your project. See Styling section below for setup instructions.

Manual Installation

If you prefer to copy the component files directly:

  1. Copy the components/classroom-calendar folder to your project
  2. Install peer dependencies:
npm install @fullcalendar/react @fullcalendar/core @fullcalendar/daygrid @fullcalendar/timegrid @fullcalendar/interaction react react-dom

Quick Start

Using NPM Package

import { CustomizedCalendar, CalendarEvent, EventType } from 'customized-calendar';

function MyCalendar() {
  const events: CalendarEvent[] = [
    {
      id: '1',
      title: 'Mathematics Session',
      start: new Date(),
      end: new Date(Date.now() + 90 * 60 * 1000),
      batchId: 'batch-001',
      batchName: 'Batch A - Morning',
      type: EventType.SESSION,
    },
  ];

  return (
    <CustomizedCalendar
      events={events}
      onDateClick={(date) => console.log('Date:', date)}
      onEventClick={(event) => console.log('Event:', event)}
      themeColor="#3b82f6"
    />
  );
}

Using Copied Component Files

import { CustomizedCalendar, CalendarEvent, EventType } from '@/components/classroom-calendar';

function MyCalendar() {
  const events: CalendarEvent[] = [
    {
      id: '1',
      title: 'Mathematics Session',
      start: new Date(),
      end: new Date(Date.now() + 90 * 60 * 1000),
      batchId: 'batch-001',
      batchName: 'Batch A - Morning',
      type: EventType.SESSION,
    },
  ];

  return (
    <CustomizedCalendar
      events={events}
      onDateClick={(date) => console.log('Date:', date)}
      onEventClick={(event) => console.log('Event:', event)}
      themeColor="#3b82f6"
    />
  );
}

Documentation

Component Structure

components/classroom-calendar/
├── CustomizedCalendar.tsx      # Main calendar component
├── AddEventModal.tsx           # Add event modal
├── EventDetailsModal.tsx       # Event details modal
├── DateEventsList.tsx          # Date events list modal
├── calendar.types.ts           # TypeScript types
├── calendar.utils.ts          # Utility functions
└── index.ts                   # Exports

Props

CustomizedCalendar

| Prop | Type | Required | Default | Description | |------|------|----------|---------|-------------| | events | CalendarEvent[] | ✅ | - | Array of calendar events | | onDateClick | (date: string) => void | ✅ | - | Callback when date is clicked | | onEventClick | (event: CalendarEvent) => void | ✅ | - | Callback when event is clicked | | height | string \| number | ❌ | 'auto' | Calendar height | | initialView | 'dayGridMonth' \| 'timeGridWeek' \| 'timeGridDay' | ❌ | 'dayGridMonth' | Initial view | | themeColor | string | ❌ | '#3b82f6' | Primary theme color (hex) | | editable | boolean | ❌ | true | Enable drag & drop | | selectable | boolean | ❌ | true | Enable date selection |

Event Types

  • SESSION: Regular class sessions (Blue: #4f46e5)
  • EVENT: Special events, labs, workshops (Green: #059669)
  • EXAM: Examinations (Red: #dc2626)
  • HOLIDAY: Holidays (Amber: #d97706)

Examples

See components/classroom-calendar/example-usage.tsx for complete examples.

Backend Integration

The component can work with any backend that provides calendar events. It's flexible and can be adapted to different API structures.

Quick Setup

  1. Copy component files to your project (see QUICK_INTEGRATION.md)
  2. Configure API service (see services/calendarApi.configurable.ts)
  3. Connect to your backend

Backend Options

  • REST API - Standard REST endpoints (see INTEGRATION_GUIDE.md)
  • GraphQL - Use GraphQL queries (see REUSABLE_PACKAGE_GUIDE.md)
  • Firebase/Supabase - Direct database integration (examples included)
  • Custom Format - Adapt to any API structure (see examples/api-config-examples.ts)

Required Endpoints

  • GET /api/calendar/events - Get events with date range
  • POST /api/calendar/events - Create event
  • PUT /api/calendar/events/:id - Update event
  • DELETE /api/calendar/events/:id - Delete event

See API_CONTRACT.md for detailed API documentation and REUSABLE_PACKAGE_GUIDE.md for backend integration strategies.

Styling

The component uses Tailwind CSS. Ensure Tailwind is configured in your project:

// tailwind.config.js
module.exports = {
  content: [
    './components/**/*.{js,ts,jsx,tsx}',
    './node_modules/customized-calendar/dist/**/*.{js,jsx}', // Include package files
    './app/**/*.{js,ts,jsx,tsx}', // Your app files
  ],
  // ... rest of config
};

Important: The component includes inline styles for FullCalendar customization, but Tailwind CSS classes are used for layout and responsive design. Make sure your Tailwind configuration includes the package files in the content array.

Browser Support

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)

License

MIT

Using in Other Projects

Want to use this calendar in another project? See the comprehensive guide:

  • REUSABLE_PACKAGE_GUIDE.md - Complete guide for using in other projects
    • Copy component files
    • Configure for different backends
    • API service examples
    • Firebase/GraphQL/Custom backend examples

Quick start: Copy components/classroom-calendar folder and install dependencies.

Support

For issues or questions:

  1. Check the Quick Integration Guide for fast setup
  2. See Reusable Package Guide for backend integration
  3. Review Integration Guide for complete documentation
  4. Check API Contract for backend requirements
  5. See example implementations in examples/ folder