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

calendarizer

v1.0.3

Published

Add to calendar button as a custom element

Downloads

6

Readme

📅 Calendarizer

MIT License Build Calendar Support Web Component Themes Minified Size Made by David Garay

Calendarizer is a lightweight, zero-dependency Web Component (<calendarizer>) that lets users instantly add events to their favorite calendar apps: Google, Outlook, Yahoo, or download a universal .ics file compatible with Apple Calendar, Outlook Desktop, and more.

Fully customizable. Themed or theme-free. Plug & play.

📘 También disponible en: Español 🇲🇽

🚀 Quick Start

1. Include the script

Embed it locally:

<script src="calendarizer.js" type="module"></script>

Or use a minified version (e.g. CDN):

<script src="calendarizer.min.js" type="module"></script>

2. Add the component

<calendarizer
  title="Product Launch"
  date-start="2025-08-01T09:00"
  date-end="2025-08-01T10:30"
  timezone="America/Mexico_City"
  location="Mexico City"
  organizer="mailto:[email protected]"
  content="Join us for the new product release.<br>Live demo and Q&A included."
  button="Add to calendar"
  theme="dark"
  theme-url="https://yoursite.com/custom-calendar-theme.css"
/>

📌 Attributes

| Attribute | Type | Required | Description | | ------------ | -------------------- | -------- | --------------------------------------------------- | | title | string | ✅ | Event title | | date-start | ISO string | ✅ | Start datetime (YYYY-MM-DDTHH:mm) | | date-end | ISO string | ✅ | End datetime | | timezone | IANA string | ✅ | Timezone (e.g. America/New_York, UTC) | | location | string | ✅ | Event location (physical or virtual) | | content | string (HTML-safe) | ✅ | Event description (supports <br> for line breaks) | | organizer | string | ❌ | Optional organizer info (mailto: or name) | | button | string | ❌ | Button label (default: "Add to calendar") | | theme | string | ❌ | Built-in theme: light, dark, neon, etc. | | theme-url | URL | ❌ | Optional custom CSS URL — overrides built-in themes |

📆 Calendar Support

  • ✅ Google Calendar
  • ✅ Outlook (Web & Desktop)
  • ✅ Yahoo Calendar
  • ✅ Apple Calendar (.ics)
  • ✅ Thunderbird & all .ics-compatible clients

🎨 Theming & Styling

  • Use theme="light" or theme="dark" for built-in styles.
  • Use theme-url="..." to override styles with custom CSS.
  • theme-url always takes precedence over theme.
  • Encapsulated via Shadow DOM for full style isolation.

Built-in themes:

  • light (default)
  • dark
  • warm
  • smoke
  • neon
  • soft

🔧 Build System

Calendarizer ships with a flexible CLI build tool.

🛠 CLI Flags

| Flag | Description | | ---------------- | --------------------------------------------------- | | --theme=name | Build a single theme (e.g. neon, smoke) | | --default=name | Set the default theme in full/all builds | | --core | Build only the core module (no themes included) | | --mode=type | Choose: all (default), full, theme, or core | | --no-minify | Skip .min.js output | | --help | Show help text |

🧪 Build Examples

pnpm run build --theme=neon
pnpm run build --default=dark --mode=full
pnpm run build --core
pnpm run build --all --no-minify

📦 Output Bundles

| File | Description | | -------------------------- | --------------------------------------- | | calendarizer.full.js | All themes embedded, default is light | | calendarizer.min.js | Minified version of full build | | calendarizer.core.js | Core only, requires theme-url | | calendarizer.core.min.js | Minified core build | | calendarizer.dark.js | Single-theme bundle (e.g. dark only) | | calendarizer.dark.min.js | Minified single-theme version | | ... and others per theme | Based on src/themes/*.css |

⚙️ Framework Support

Works seamlessly in any modern frontend stack:

<calendarizer
  title="Launch Meeting"
  date-start="2025-08-01T15:00"
  date-end="2025-08-01T16:00"
  timezone="America/Los_Angeles"
  content="Live Zoom event with our team"
  button="Add it"
/>
  • ✅ React
  • ✅ Vue
  • ✅ Svelte
  • ✅ Astro
  • ✅ Vanilla HTML

📁 .ics File Structure

Generated .ics files follow RFC 5545 spec and include:

  • DTSTART / DTEND with proper UTC or TZID
  • UID, DTSTAMP, ORGANIZER, and DESCRIPTION
  • Proper line folding, escaping, and timezone handling

🛡 Security Notes

  • Uses rel="noopener" to prevent window hijacking
  • Sanitizes content before .ics export
  • IANA timezone support built-in (tzdata fallback optional)

🧪 Dev Scripts

"scripts": {
  "build": "node scripts/build.js",
  "build:help": "node scripts/build.js --help",
  "build:core": "node scripts/build.js --core",
  "build:all": "node scripts/build.js --all --default=dark",
  "build:theme": "node scripts/build.js --theme=warm",
  "build:theme:neon": "node scripts/build.js --theme=neon",
  "build:theme:dark": "node scripts/build.js --theme=dark",
  "build:theme:smoke": "node scripts/build.js --theme=smoke",
  "build:full": "node scripts/build.js --mode=full",
  "build:full:dark": "node scripts/build.js --default=dark --mode=full",
  "build:full:neon": "node scripts/build.js --default=neon --mode=full",
  "build:dev": "node scripts/build.js --all --no-minify",
  "dev": "npm run build:dev"
}

📄 License

MIT © 2025 David Garay

Made with ❤️ by David Garay