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

fast-react-calendar

v1.0.0-alpha.9

Published

A fast and flexible calendar component for React, only for MUI.

Readme

CI

-- Gif Demo example --

Key Features

  • Fast: Built with performance in mind, Fast React Calendar is optimized for speed and efficiency.
  • Lightweight: Minimal dependencies and a small footprint ensure quick load times.
  • Customizable: Easily style and configure the calendar to fit your application's design.
  • Responsive: Works seamlessly across devices, adapting to different screen sizes.
  • Easy to Use: Simple API and clear documentation make integration a breeze.
  • MUI Integration: Built specifically for MUI, ensuring a consistent look and feel with your existing components.
  • Accessibility: Designed with accessibility in mind, ensuring all users can interact with the calendar.

How To Use

To use Fast React Calendar in your MUI project, follow these steps:

  1. Install the package:

    npm install @mui/material @mui/styled-engine-sc styled-components fast-react-calendar
  2. Import the component:

    import { FastCalendar } from "fast-react-calendar";
  3. Use the component in your JSX:

    <FastCalendar
        events={yourEvents} // Check the Events section for more details
    />

Theming

Fast React Calendar uses MUI's theming capabilities. You can customize the calendar's appearance by wrapping it in a ThemeProvider and passing your theme.

// app.tsx (or layout.tsx)
import React from 'react';
import ReactDOM from 'react-dom/client';

import { createTheme, ThemeProvider } from "@mui/material/styles";
import CssBaseline from "@mui/material/CssBaseline";

import { FastCalendar } from "fast-react-calendar";

const theme = createTheme({
    palette: {
        // Customize your theme here
        mode: "dark",
        primary: {
            main: "#1976d2",
        },
        secondary: {
            main: "#f50057",
        },
        background: {
            default: "#121212",
            paper: "#1976d2",
        },
    },
});

ReactDOM.createRoot(document.getElementById('root')!).render(
    <ThemeProvider theme={theme}>
        <CssBaseline />
        <App />
    </ThemeProvider>
);

Events

Fast Calendar supports a variety of events that can be passed to the component. Events are objects with the following structure:

type CalendarEvent {
    id: string; // Unique identifier for the event
    title: string; // Title of the event
    start: Date; // Start date and time of the event
    end: Date; // End date and time of the event
    allDay?: boolean; // Optional, true if the event lasts all day
    color?: string; // Optional, custom color for the event
}

CalendarEvent is the type for each event object. You can import it from the library:

import { type CalendarEvent } from "fast-react-calendar";

Start using events

To start using events, you have to use useEvents hook, which provides a way to manage events in your calendar easily. This hook returns objects with the following properties:

type useEvents {
    events: CalendarEvent[]; // Array of current events
    loading: boolean; // Indicates if events are currently being loaded
    error: Error | null; // Error object if there was an issue loading events
    refresh: () => void; // Function to refresh the events
}

useEvents takes a function as an argument that returns a promise resolving to an array of CalendarEvent objects. This function is called whenever the calendar needs to load events.

import { useEvents, type CalendarEvent } from "fast-react-calendar";

const fetchEvents = async (): Promise<CalendarEvent[]> => {
    const response = await fetch("https://example.com/api");
    if (!response.ok) {
        throw new Error("Failed to fetch events");
    }
    const data = await response.json();
    return data as CalendarEvent[];
};

const { events, loading, error, refresh } = useEvents({fetchEvents});

return (
    <FastCalendar
        events={events}
    />
)

Data state management

Fast React Calendar provides loading, error, and refresh properties to manage the state of your events data. You can use these properties to show loading indicators, handle errors, or refresh the event list.

If you want to let Fast React Calendar handle states for you, you can pass them from dataState prop:

<FastCalendar
    events={events}
    dataState={{
        loading: loading,
        error: error,
    }}
/>

Customization

You can customize components by using components prop:

<FastCalendar
    events={events}
    components={{
        loading: () => <div>Loading...</div>,
        error: (props) => <div>Error: {props.error.message}</div>,
    }}
/>

Development

To run the project locally during development:

# Clone the repository
git clone https://github.com/Mattis44/fast-react-calendar.git
cd fast-react-calendar

# Install dependencies
npm install

# Run the development server
npm run dev

# Install fast-react-calendar as a local dependency from a project with MUI
npm install --save ../fast-react-calendar

Code Structure Overview

  • components/: React components (calendar UI, header, etc.)
  • hooks/: Custom hooks like useEvents
  • types/: TypeScript types
  • utils/: Reusable functions (e.g., date helpers, rendering utilities)

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository
  2. Create a new branch: git checkout -b feature/your-feature-name
  3. Make your changes
  4. Submit a pull request

Please include tests or documentation updates where relevant.