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

customizable-nepali-calendar

v2.0.2

Published

CLI tool to add customizable Nepali calendar components to your project (shadcn-style)

Downloads

14

Readme

Customizable Nepali Calendar

A CLI tool to add beautiful, customizable Nepali (Bikram Sambat) calendar components to your React project.

Copy. Paste. Customize. Not a component library. Not a package. Just copy the code into your project and make it yours.

Features

  • 🗓️ Full Nepali Calendar - Complete Bikram Sambat calendar with accurate date calculations
  • 🌐 Bilingual Support - Switch between Nepali (Devanagari) and English
  • 🎨 Fully Customizable - Source code is copied to your project - style it however you want
  • 📅 Event Annotations - Add holidays, reminders, and events with color coding
  • 🎯 Today Highlighting - Visual marker for current date
  • 📱 Responsive Design - Works on all screen sizes
  • No Bundle Bloat - Only add what you need

Installation

npm install -D customizable-nepali-calendar

Usage

1. Initialize

Run the init command to set up your project:

npx nepali-calendar init

This will ask you where to install components, data files, and styles. A nepali-calendar.json config file will be created.

2. Add Components

Add the calendar component to your project:

npx nepali-calendar add calendar

This copies the source files directly into your project:

  • src/components/nepali-calendar/NepaliCalendar.jsx - Main component
  • src/components/nepali-calendar/engine/ - Calendar calculation engine
  • src/data/nepali-calendar/ - Calendar data and locales
  • src/styles/nepali-calendar.css - Component styles

3. Use in Your App

import { NepaliCalendar } from '@/components/nepali-calendar/NepaliCalendar';

function App() {
  return (
    <div>
      <NepaliCalendar
        width={360}
        height={420}
        initialYear={2081}
        initialMonth={0}
        language="ne"  // 'ne' for Nepali, 'en' for English
      />
    </div>
  );
}

Component Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | width | number | 360 | Calendar width in pixels | | height | number | 420 | Calendar height in pixels | | initialYear | number | 2081 | Starting year (BS) | | initialMonth | number | 0 | Starting month (0-11) | | language | string | "ne" | Display language ("ne" or "en") | | className | string | "" | Additional CSS classes | | style | object | {} | Inline styles | | layout | object | {} | Customize section sizes (see Layout Customization) | | colors | object | {} | Customize theme colors (see Color Customization) | | colorTokens | object | {} | Add/override annotation colors (see Color Customization) |

Layout Customization

Control the size of every calendar section:

<NepaliCalendar
  layout={{
    containerWidth: 480,        // overall calendar width
    containerHeight: 520,       // overall calendar height
    headerHeight: 80,           // top bar (month/year) height
    headerPadding: "18px 20px", // spacing inside header
    weekdaysHeight: 34,         // weekdays row height
    weekdaysPadding: "6px 0 10px",
    gridGap: 12,                // spacing between day cells
    gridPadding: 14,            // padding around the grid
    dayCellMinHeight: 72,       // each date cell height
    dayCellMinWidth: 44,        // each date cell width
    dayCellPadding: "10px 6px", // inner padding for date cells
  }}
/>

Color Customization

Customize theme colors and annotation tokens:

<NepaliCalendar
  colors={{
    primary: "#0d9488",
    primarySoft: "#ccfbf1",
    bgMain: "#fdfcfb",
    bgSoft: "#f4f4f5",
    bgHover: "#e0f2f1",
    holidayBg: "#fff4e5",
    holidayText: "#ea580c",
    textMain: "#0f172a",
    textMuted: "#94a3b8",
  }}
  colorTokens={{
    primary: "#0d9488",
    teal: "#14b8a6",     // use in dayAnnotations color field
    orange: "#f97316",
  }}
/>

Customization

Props-Based Customization

Use layout, colors, and colorTokens props for quick styling without editing files (see Component Props section above).

Direct Code Customization

Since the code is in your project, you can also customize everything by editing files directly:

Add More Years

Edit src/data/nepali-calendar/bsCalendar.js:

const BS_CALENDAR = {
  years: {
    2083: {
      startWeekday: 4,
      months: [31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30],
    },
    // Add more years...
  },
};

Add Events/Holidays

Edit src/data/nepali-calendar/dayAnnotations.js:

export const DAY_ANNOTATIONS = {
  "2081-0-15": [
    { 
      type: "holiday", 
      label: { ne: "नयाँ वर्ष", en: "New Year" }, 
      color: "red" 
    },
  ],
  // Add more annotations...
};

Add Custom Color Tokens

Edit src/data/nepali-calendar/colorTokens.js to add annotation colors:

export const COLOR_TOKENS = {
  red: "#dc2626",
  blue: "#2563eb",
  purple: "#7c3aed",
  myCustomColor: "#your-color",  // Add custom colors
};

Then use in dayAnnotations.js:

{
  type: "event",
  label: { ne: "कस्टम", en: "Custom" },
  color: "myCustomColor",  // reference your custom token
}

Style the Calendar

Edit src/styles/nepali-calendar.css - customize everything from colors to layout.

CLI Commands

init

Initialize configuration for your project. Creates nepali-calendar.json with your preferred paths.

npx nepali-calendar init

Note: Works in interactive mode. Non-interactive? Just create nepali-calendar.json manually:

{
  "componentsPath": "src/components/nepali-calendar",
  "dataPath": "src/data/nepali-calendar",
  "stylesPath": "src/styles"
}

add [component]

Add a component to your project. Copies all files and updates import paths automatically.

npx nepali-calendar add calendar

Why This Approach?

This isn't a traditional npm package or component library. Instead:

  • Full Control - Code is in your project, modify anything
  • No Vendor Lock-in - Not dependent on package updates
  • Easy Debugging - See and fix issues directly
  • Custom Styling - No CSS conflicts or overrides
  • Tree Shakeable - Only bundle what you use

Requirements

  • React 16.8.0 or higher (for hooks)
  • A React project with JSX support

Data Coverage

Currently includes calendar data for years:

  • 2080 BS
  • 2081 BS
  • 2082 BS

Add more years by editing bsCalendar.js in your project.

License

ISC

Contributing

Issues and pull requests are welcome!

Links


Made with ❤️ by dAIgnosisLab