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

mh-calendar-core

v0.1.1

Published

Core of the mh-calendar

Readme

MHCalendar Core

NPM Version License: MIT Docs

The core Web Component for MHCalendar, a powerful and fully customizable calendar component for any framework, or no framework at all.

mhcalendar

✨ Features

  • 🗓️ Multiple Views: Seamlessly switch between Day, Week, and Month layouts.
  • ⚡️ Intuitive Drag & Drop: Move events with ease.
  • 🎨 Highly Customizable: Style every aspect with standard CSS or CSS-in-JS.
  • 🧩 Framework Agnostic: Works natively in any project (Vanilla JS, Vue, Angular, Svelte, etc.) WIP.

🚀 Installation

Install the core package using your preferred package manager:

npm

npm install mh-calendar-core

Yarn

yarn add mh-calendar-core

pnpm

pnpm add mh-calendar-core

Bun

bun add mh-calendar-core

Basic Usage

To use MHCalendar as a Web Component, you need to import its loader to define the custom element <mh-calendar>.

Here is a full example in a basic index.html file:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <title>MHCalendar Core Demo</title>
  <!-- 1. Import and run the loader script -->
  <script type="module">
    import { defineCustomElements } from 'https://cdn.jsdelivr.net/npm/mh-calendar-core/loader/index.es2017.js';
    defineCustomElements();
  </script>
</head>
<body>
  
  <h1>My Calendar</h1>

  <!-- 2. Use the component tag in your HTML -->
  <!-- It's recommended to place it inside a container with a defined height -->
  <div style="height: 80vh;">
    <mh-calendar id="my-calendar"></mh-calendar>
  </div>

  <script>
    // 3. (Optional) Configure the component using JavaScript
    document.addEventListener('DOMContentLoaded', () => {
      const calendarElement = document.getElementById('my-calendar');
      
      // Pass configuration via the 'config' property
      calendarElement.config = {
        viewType: 'WEEK',
        events: [
          {
            id: '1',
            title: 'My First Event',
            startDate: new Date(),
            endDate: new Date(new Date().getTime() + 60 * 60 * 1000) // 1 hour later
          }
        ]
      };
    });
  </script>

</body>
</html>

Note: In a project with a bundler (like Vite or Webpack), you should import from 'mh-calendar-core/loader' in your main JavaScript file instead of using a CDN link.


📚 Full Documentation

For detailed information on all configuration options, API methods, and styling guides, please visit our full documentation site.

📄 License

This project is licensed under the MIT License.