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

curtain-opening-effect

v1.0.5

Published

Beautiful curtain opening animation for websites - supports Vanilla JS, React, Vue, and Web Components

Readme

🎭 Curtain Opening Effect - Reusable CSS & JavaScript

A beautiful, reusable curtain opening animation that can be easily integrated into any website. Perfect for splash screens, welcome pages, event websites, and creating dramatic reveals!

License: MIT CSS3 JavaScript

✨ Features

  • 🎪 5 Built-in Themes - Default, Royal, Elegant, Gold, and Saffron
  • 🖼️ Custom Images - Use your own curtain textures
  • Speed Control - Adjustable animation duration (1s - 10s)
  • 🎵 Sound Effects - Optional audio feedback
  • Particle Effects - Beautiful falling sparkles
  • Auto-Open - Automatic opening after delay
  • 📱 Mobile Responsive - Works on all screen sizes
  • 🌐 Zero Dependencies - Pure CSS & JavaScript
  • 🔧 Easy Integration - 2-minute setup
  • 🎨 Fully Customizable - Colors, text, images, timing

🚀 Quick Start (2 Minutes)

Step 1: Include Files

<!-- Include CSS -->
<link rel="stylesheet" href="curtain-assets/css/curtain-effect.css">

<!-- Include Font Awesome for icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">

<!-- Include JavaScript -->
<script src="curtain-assets/js/curtain-effect.js"></script>

Step 2: Configure & Initialize

<script>
// Set curtain configuration
window.curtainConfig = {
    title: 'Welcome to My Website',
    subtitle: 'Click to explore amazing content',
    buttonText: 'Enter Now'
};
</script>

That's it! Your curtain effect is ready. 🎉

� Framework Support

This library supports multiple JavaScript frameworks:

📦 NPM Installation

npm install curtain-opening-effect

⚛️ React Usage

import CurtainEffect from 'curtain-opening-effect/react';

function App() {
  return (
    <CurtainEffect
      title="Welcome to React App"
      subtitle="Click to continue"
      theme="royal"
      onComplete={() => console.log('Curtains opened!')}
    >
      <div>Your main content here</div>
    </CurtainEffect>
  );
}

🌿 Vue Usage

<template>
  <CurtainEffect
    title="Welcome to Vue App"
    subtitle="Click to continue"
    theme="elegant"
    @complete="onComplete"
  >
    <div>Your main content here</div>
  </CurtainEffect>
</template>

<script>
import CurtainEffect from 'curtain-opening-effect/vue';

export default {
  components: { CurtainEffect },
  methods: {
    onComplete() {
      console.log('Curtains opened!');
    }
  }
}
</script>

🧩 Web Components (Universal)

<!-- Works with any framework or vanilla JavaScript -->
<curtain-effect
  title="Welcome"
  subtitle="Click to enter"
  theme="gold"
  auto-open="true"
  auto-open-delay="3000"
>
</curtain-effect>

<script src="curtain-opening-effect/web-component"></script>

🏃‍♂️ Vanilla JavaScript

<script src="curtain-opening-effect/vanilla"></script>
<script>
CurtainEffect.init({
  title: 'Welcome',
  subtitle: 'Click to enter',
  theme: 'saffron'
});
</script>

�🎨 Themes Preview

| Theme | Colors | Best For | |-------|--------|----------| | Default | Deep red with brown tones | Classic theaters, general use | | Royal | Purple gradient | Premium sites, luxury brands | | Elegant | Gray-blue gradient | Professional, corporate sites | | Gold | Golden gradient | Celebrations, awards, VIP | | Saffron | Orange-golden gradient | Indian festivals, cultural events |

📋 Configuration Options

window.curtainConfig = {
    // Content
    title: 'Welcome',                    // Main heading text
    subtitle: 'Click to Enter',          // Secondary text
    buttonText: 'Open Curtains',         // Button label
    
    // Appearance
    theme: 'default',                    // 'default', 'royal', 'elegant', 'gold', 'saffron'
    leftCurtainImage: '',               // Custom left curtain image path
    rightCurtainImage: '',              // Custom right curtain image path
    
    // Animation
    speed: 2000,                        // Duration in milliseconds (1000-10000)
    sparkles: true,                     // Show particle effects
    
    // Auto-open
    autoOpen: false,                    // Auto-open without user click
    autoOpenDelay: 5000,                // Delay before auto-opening (ms)
    
    // Audio
    sound: false,                       // Play clapping sound
    
    // Callbacks
    onOpen: function() {                // Called when opening starts
        console.log('Opening!');
    },
    onComplete: function() {            // Called when animation completes
        console.log('Welcome!');
    }
};

🛠️ Advanced Usage

Method 1: JavaScript API

// Initialize with custom options
CurtainEffect.init({
    title: 'IISF 2025',
    subtitle: 'India International Science Festival',
    buttonText: 'Enter Festival',
    theme: 'saffron',
    sparkles: true,
    speed: 2000,
    onComplete: function() {
        alert('Welcome to IISF 2025! 🎉');
    }
});

// Control methods
CurtainEffect.forceOpen();           // Open programmatically
CurtainEffect.setTitle('New Title'); // Change title
CurtainEffect.setTheme('gold');      // Change theme
CurtainEffect.destroy();             // Remove curtains

Method 2: HTML Data Attributes

<div data-curtain-auto="true"
     data-curtain-title="My Website"
     data-curtain-subtitle="Welcome!"
     data-curtain-button="Enter"
     data-curtain-theme="saffron"
     data-curtain-speed="2000"
     data-curtain-sparkles="true"
     data-curtain-sound="false">
</div>

🌟 Real-World Examples

E-commerce Sale Page

CurtainEffect.init({
    title: 'Black Friday Sale',
    subtitle: '50% Off Everything - Limited Time!',
    buttonText: 'Shop Now',
    theme: 'gold',
    autoOpen: true,
    autoOpenDelay: 2000,
    sparkles: true
});

Event Landing Page

CurtainEffect.init({
    title: 'IISF 2025',
    subtitle: 'India International Science Festival',
    buttonText: 'Enter Festival',
    theme: 'saffron',
    leftCurtainImage: 'images/indian-flag-left.jpg',
    rightCurtainImage: 'images/indian-flag-right.jpg',
    sparkles: true,
    sound: true
});

Portfolio Website

CurtainEffect.init({
    title: 'John Doe',
    subtitle: 'Creative Web Developer',
    buttonText: 'View Portfolio',
    theme: 'elegant',
    speed: 2500
});

📁 Project Structure

curtains-effect-js-and-css/
├── curtain-examples.html          # Demo page with all examples
├── package.json                   # NPM package configuration
├── dist/                          # Distribution files
│   ├── vanilla/                   # Vanilla JS version
│   │   ├── css/curtain-effect.css
│   │   └── js/curtain-effect.js
│   ├── react/                     # React components
│   │   ├── CurtainEffect.jsx
│   │   ├── CurtainEffect.css
│   │   └── index.js
│   ├── vue/                       # Vue components
│   │   ├── CurtainEffect.vue
│   │   ├── CurtainEffect.css
│   │   └── index.js
│   └── web-component/             # Universal Web Component
│       └── curtain-effect.js
├── types/                         # TypeScript definitions
│   └── index.d.ts
├── examples/                      # Framework-specific examples
├── curtain-assets/                # Legacy structure (maintained)
│   ├── css/, js/, images/, sounds/
├── README.md                      # This file
└── .gitignore                     # Git ignore rules

🎯 Use Cases

  • Welcome Screens - Greet visitors with style
  • Event Websites - Perfect for conferences, festivals
  • Product Launches - Create anticipation and excitement
  • Portfolio Sites - Make a memorable first impression
  • E-commerce - Announce sales and special offers
  • Theaters & Arts - Perfect thematic match
  • Restaurants - Elegant dining experience intro
  • Gaming Sites - Dramatic game reveals

🌐 Browser Support

  • ✅ Chrome 60+
  • ✅ Firefox 55+
  • ✅ Safari 12+
  • ✅ Edge 79+
  • ✅ Mobile Chrome/Safari
  • ✅ Internet Explorer 11+ (partial support)

📱 Mobile Optimization

  • Responsive design adapts to all screen sizes
  • Touch-friendly button sizing
  • Optimized animations for mobile performance
  • Prevents unwanted scrolling during animation

🔧 Customization Tips

Custom Colors

.curtain-theme-custom .curtain-panel {
    background: linear-gradient(45deg, #your-color-1, #your-color-2);
}

Custom Animations

.curtain-container.opening .curtain-left {
    transform: translateX(-100%) rotateY(45deg);
}

Custom Fonts

.curtain-title {
    font-family: 'Your Custom Font', serif;
}

🐛 Troubleshooting

| Issue | Solution | |-------|----------| | Curtains not showing | Check CSS/JS file paths and loading order | | Sound not playing | Browser blocks autoplay - user interaction required | | Mobile issues | Ensure viewport meta tag is set | | Images not loading | Verify image paths are correct and accessible | | Z-index conflicts | Curtain uses z-index 10000+ - adjust if needed |

�‍💻 Author

Tulsiram Kushwah - Software Engineer

�📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

🙏 Credits

  • Created with ❤️ by Tulsiram Kushwah for the web development community
  • Icons by Font Awesome
  • Inspired by theater curtains and dramatic reveals

📧 Support

If you like this project, please ⭐ star it on GitHub!

For support, questions, or feature requests, please open an issue.


Made with 🎭 by Tulsiram Kushwah for creating magical web experiences