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 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-calendar-resource

v1.0.16

Published

React Calendar Resource is an interactive and customizable React component that provides a timeline view for resource scheduling. It features a two-column layout—with resources on the left and a dynamic time grid on the right—and supports intuitive drag-a

Readme

React Calendar Resource

React Calendar Resource is an interactive and customizable React component for resource scheduling. It provides a timeline-based calendar view where users can manage events and resources efficiently with drag-and-drop functionality.

Features

  • Resource-based scheduling – Organize and display events per resource.
  • Drag-and-drop support – Easily move and reschedule events.
  • Customizable UI – Adjust styles, time slots, and event rendering.
  • Interactive event management – Create, edit, and delete events dynamically.
  • Zero dependencies – No using 3rd-party libraries.

Installation

npm install react-calendar-resource

or

yarn add react-calendar-resource

Usage

import React from 'react';
import { ResourceCalendar } from 'react-calendar-resource';

const data = [
  {
    resource: { id: 1, title: 'Resource 1' },
    events: [
      { id: 1, title: 'Event 1', start: '2024-03-15T09:00:00', end: '2024-03-15T10:00:00' }
    ]
  }
];

const App = () => (
  <ResourceCalendarTimeline
    data={data}
    onEventDragEnd={(start, resource, event) => console.log('Event moved', start, resource, event)}
  />
);

export default App;

Screenshots

Basic usage

Basic usage

Grouped list

Grouped list

Props

| Prop | Type | Default | Description | |-------------------------|---------------------------------------------------------------|--------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | data | CalendarData[] | None | An array of calendar data objects. Each object contains a resource and its associated events. This is the primary dataset for rendering the calendar. | | selectedDate | Date | None | The current date used as the reference for the timeline. It determines the time slots and event display. | | containerStyle | React.CSSProperties | {} | Optional inline styles applied to the overall calendar container for custom appearance. | | renderResource | (resource: Resource) => React.ReactNode | Renders the resource's title | A custom render function for displaying a resource in the left column. Override this to provide a custom layout or additional details. | | renderEvent | (event: CalendarEvent, resource: Resource) => React.ReactNode | Renders a default event view | A custom render function for displaying calendar events in the timeline. Customize this to include icons, custom formatting, or additional UI elements. | | onEventDragEnd | (newDate: Date, resource: Resource, event: CalendarEvent) => void | None | Callback triggered when an event drag-and-drop action is completed. It provides the new start time, the resource, and the event to update your data accordingly. | | onDoubleClick | (time: Date, resource: Resource) => void | None | Callback fired when a double-click occurs on a time slot. This can be used to create new events or trigger custom actions. | | eventContainerStyle | React.CSSProperties | {} | Optional inline styles applied to the container holding event elements. Useful for customizing event block appearance such as background color, borders, or padding. | | startHour | number | 0 | The starting hour for the calendar timeline. This defines the beginning of the time slots displayed in the calendar. | | endHour | number | 23 | The ending hour for the timeline, determining the last time slot of the day. | | dragConstraints | DragConstraintsProps | { minuteStep: 10, preventOverlap: true, showMinuteStepDivider: false } | An object that defines constraints for event dragging: minuteStep specifies the snapping increment in minutes, preventOverlap prevents events from overlapping if set to true and showMinuteStepDivider will add dividers to hour slots. | | groupBy | keyof Resource | None | Optional property to group resources based on a specific key from the Resource type (e.g., department, floor, specialty). When provided, the calendar groups resources internally and displays toggles. | | slotWidth | number | 120 | Optional Default time slot width |

License

This project is licensed under the MIT License.