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

muvi-calendar

v1.17.0

Published

Dynamic Calendar with Drag and Drop Functionality: Lightweight and Customizable

Downloads

108

Readme

MuviCalendar

A dynamic calendar component with drag-and-drop and resize functionalities, built with React and TypeScript.

Installation

npm install muvi-calendar
# or
yarn add muvi-calendar
# or
pnpm add muvi-calendar

Usage

import { MuviCalendar } from 'muvi-calendar';
import 'muvi-calendar/dist/index.css'; // Import styles

function App() {
  const venues = [
    { id: '1', name: 'Venue 1', color: '#ff6b6b' },
    { id: '2', name: 'Venue 2', color: '#4ecdc4' },
  ];

  const items = [
    {
      id: '1',
      start_date: '2024-04-18T10:00:00Z',
      end_date: '2024-04-18T12:00:00Z',
      duration: 120,
      name: 'Event 1',
      stage_id: '1',
    },
  ];

  const days = ['2024-04-18', '2024-04-19', '2024-04-20'];

  const handleItemMove = async (
    itemId: string,
    newStartDate: string,
    newVenueId: string
  ) => {
    // Handle item movement
    console.log('Item moved:', itemId, newStartDate, newVenueId);
  };

  const handleClick = (item: any) => {
    console.log('Item clicked:', item);
  };

  const handleScheduleEvent = (date: string, venueId: string) => {
    console.log('Schedule event:', date, venueId);
  };

  return (
    <MuviCalendar
      venues={venues}
      items={items}
      days={days}
      onItemMove={handleItemMove}
      onClick={handleClick}
      scheduleEvent={handleScheduleEvent}
      timezone="Z"
    />
  );
}

Props

CalendarGridProps

| Prop | Type | Required | Description | | -------------------- | --------------------- | -------- | ----------------------------------------------- | | venues | VenueProps[] | Yes | Array of venue objects | | items | ItemProps[] | Yes | Array of event items | | days | string[] | Yes | Array of date strings (YYYY-MM-DD format) | | onItemMove | Function | Yes | Callback when an item is moved | | onClick | Function | Yes | Callback when an item is clicked | | scheduleEvent | Function | Yes | Callback when scheduling a new event | | timezone | string | No | Timezone offset (e.g., '-03:00', '+05:30', 'Z') | | onResize | Function | No | Callback when an item is resized | | onClickEmpty | Function | No | Callback when clicking on empty space | | itemDetails | boolean | No | Show item details modal | | customModal | React.ComponentType | No | Custom modal component | | CustomHeader | React.ComponentType | No | Custom header component | | CustomVenueButtons | React.ComponentType | No | Custom venue buttons component | | itemConfig | ItemConfig | No | Configuration for item rendering | | venueConfig | VenueConfig | No | Configuration for venue rendering | | styleProps | StyleProps | No | Styling configuration | | loading | ReactNode | No | Loading component | | loadingStyle | CSSProperties | No | Loading styles | | actionBar | any | No | Action bar configuration |

Types

VenueProps

interface VenueProps {
  id: string;
  name: string;
  color?: string;
  open_times?: OpenTimes[];
}

ItemProps

interface ItemProps {
  id: string;
  start_date: number | string | null;
  end_date?: number | string | null;
  duration: number;
  name?: string;
  category?: string;
  icon?: string | ElementType | ReactNode;
  artist?: string;
  className?: string;
  style?: CSSProperties;
  stage_id: string | null;
}

Features

  • Drag and Drop: Move events between venues and time slots
  • Resize: Resize events by dragging their edges
  • Promise-based Operations: Support for async operations with loading states
  • Customizable UI: Extensive styling and component customization options
  • Timezone Support: Full timezone handling with dayjs
  • TypeScript: Full TypeScript support with comprehensive type definitions
  • Responsive Design: Works on desktop and mobile devices

License

MIT