JSPM

festive-js

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q55977F
  • License MIT

A tiny, zero-dependency JavaScript library to add festive overlays to your website.

Package Exports

  • festive-js

Readme

🎉 Festive.js

A tiny, zero-dependency JavaScript library that adds seasonal overlays (Christmas snow ❄️, Diwali crackers 🎆, etc.) to websites.

LightweightNon-intrusiveZero dependenciesAuto-triggering

✨ Features

  • 📦 Drop-in script - Just include and initialize
  • 🎨 Multiple themes - Christmas, Diwali, and more
  • Tiny footprint - Under 10KB minified
  • 🖼️ Non-intrusive - Won't break your site's design
  • 🔧 Configurable - Customize colors, density, and behavior
  • 📅 Smart activation - Auto-activates based on dates
  • 🌐 Universal - Works with any website or framework

🚀 Quick Start

Installation

Via npm

npm install festive-js

Via CDN (unpkg)

<script src="https://unpkg.com/festive-js/core.min.js"></script>
<script>
  Festive.init(); // auto-pick theme by date
</script>

Via CDN (jsDelivr)

<script src="https://cdn.jsdelivr.net/npm/festive-js/core.min.js"></script>
<script>
  Festive.init(); // auto-pick theme by date
</script>

Usage

ES Modules

import Festive from 'festive-js';

// Auto-pick theme by date
Festive.init();

// Or force a specific theme
Festive.init({ forceTheme: 'snowfall' });

CommonJS

const Festive = require('festive-js');
Festive.init();

⚙️ Configuration

Force a specific theme

Festive.init({ 
  forceTheme: "snowfall" 
});

Customize theme parameters

Festive.init({
  forceTheme: "snowfall",
  themes: {
    "snowfall": { 
      density: 150, 
      snowflakeChar: "✦", 
      color: "#87ceeb",
      driftRange: 30 
    }
  }
});

Santa theme example

Festive.init({
  forceTheme: "santa",
  themes: {
    "santa": {
      santaSize: 200,
      unicycleDuration: 10,
      sledDuration: 8,
      showOverlay: true
    }
  }
});

� Documentation & Examples

For detailed documentation, theme gallery, playground, and contribution guidelines, visit the GitHub repository.

📝 License

MIT License - see LICENSE for details.


Made with ❤️ by Inovus Labs