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-nepalipatro

v1.5.3

Published

A reusable Nepali (Bikram Sambat) calendar React component.

Readme

📅 react-nepalipatro

A reusable and customizable Nepali (Bikram Sambat - BS) and English (AD) calendar component for React & Next.js applications. Supports event rendering, click handlers, and full styling flexibility.


✨ Features

  • 📆 Switch between Bikram Sambat (BS) and AD (Gregorian) calendars.
  • 🎉 Highlight days with events.
  • 🖱️ Day click handlers for interactive apps.
  • 🎨 Fully customizable styles via CSS Modules & props.
  • 🚀 Lightweight and optimized performance.
  • 🌐 Supports Devanagari fonts injection for BS rendering.

📦 Installation

npm install react-nepalipatro
import { NepaliCalendar } from "react-nepalipatro";

const MyComponent = () => {
  return (
    <NepaliCalendar
      calendarType="BS" // or "AD"
      events={[
        { id: 1, date: "2025-08-05", title: "Event Title" },
        { id: 2, date: "2025-08-06", title: "Another Event" },
      ]}
      onDayClick={({ bsDate, adDate, events }) => {
        console.log("Clicked date:", bsDate, adDate, events);
      }}
    />
  );
};

| Prop | Type | Default | Description | | ------------ | ------------------------------------------------------------------ | --------- | ------------------------------------------------------------ | | calendarType | "BS" | "AD" | "BS" | Calendar mode, either Bikram Sambat (BS) or AD (Gregorian). | | events | { id: string | number; date: string; title: string; }[] | [] | Array of events with AD date format (YYYY-MM-DD). | | onDayClick | (day: { bsDate: string; adDate: string; events: Event[] }) => void | undefined | Function called when a day is clicked. | | renderDay | (date: string) => React.ReactNode | undefined | Custom renderer for day numbers (icons, badges, etc.). | | classNames | Partial | {} | Override CSS class names for root, header, grid, cells, etc. | | styles | Partial | {} | Inline style overrides for root, header, grid, etc. |

🎨 Customization Uses CSS Modules (scoped styles).

Pass classNames prop to override default structure.

Pass inline styles via styles prop for dynamic theming.

<NepaliCalendar
  classNames={{ dayCell: "myCustomDayCell", root: "myRootWrapper" }}
  styles={{ root: { backgroundColor: "#f0f0f0" } }}
/>

📅 Event Dates Format All event dates should be in AD (YYYY-MM-DD) format.

The calendar will auto-convert them to BS if the mode is "BS".

🖋 Example Events Data

[
  { id: 1, date: "2025-08-05", title: "New Year Celebration" },
  { id: 2, date: "2025-08-06", title: "Another Event" },
]

🏷 License MIT License © 2025 jacksonrai