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

@bpleffken/enchanter

v1.4.1

Published

Native JS form wizard plugin for Bootstrap 5

Downloads

225

Readme

Enchanter

Enchanter is a lightweight vanilla JS form wizard plugin for Bootstrap 5 — with no dependencies!

Screenshot 2022-12-02 at 10-41-46 Enchanter

Quick Start

1. Installation

Add Enchanter to your package.json:

npm install @bpleffken/enchanter

2. Basic Setup

Create your form with three main components:

Step 1: Create the navigation tabs

<nav class="nav nav-pills nav-fill" id="nav-tab">
  <a class="nav-link active" id="step1-tab" data-bs-toggle="tab" href="#step1">Step 1</a>
  <a class="nav-link" id="step2-tab" data-bs-toggle="tab" href="#step2">Step 2</a>
  <a class="nav-link" id="step3-tab" data-bs-toggle="tab" href="#step3">Step 3</a>
</nav>

Step 2: Add your form content using the tab-pane classes

<div class="tab-content" id="nav-tabContent">
  <div class="tab-pane fade show active" id="step1">
    <!-- Step 1 content here -->
  </div>
  <div class="tab-pane fade" id="step2">
    <!-- Step 2 content here -->
  </div>
  <div class="tab-pane fade" id="step3">
    <!-- Step 3 content here -->
  </div>
</div>

Step 3: Add navigation buttons

<button type="button" class="btn btn-secondary" data-enchanter="previous">Previous</button>
<button type="button" class="btn btn-primary" data-enchanter="next">Next</button>
<button type="submit" class="btn btn-primary" data-enchanter="finish">Finish</button>

Complete Example:

<form action="" method="post" id="registration">
  <!-- Navigation tabs -->
  <nav class="nav nav-pills nav-fill" id="nav-tab">
    <a class="nav-link active" id="step1-tab" data-bs-toggle="tab" href="#step1">Step 1</a>
    <a class="nav-link" id="step2-tab" data-bs-toggle="tab" href="#step2">Step 2</a>
    <a class="nav-link" id="step3-tab" data-bs-toggle="tab" href="#step3">Step 3</a>
  </nav>

  <!-- Form content -->
  <div class="tab-content" id="nav-tabContent">
    <div class="tab-pane fade show active" id="step1">Page 1</div>
    <div class="tab-pane fade" id="step2">Page 2</div>
    <div class="tab-pane fade" id="step3">Page 3</div>
  </div>

  <!-- Navigation buttons -->
  <button type="button" class="btn btn-secondary" data-enchanter="previous">Previous</button>
  <button type="button" class="btn btn-primary" data-enchanter="next">Next</button>
  <button type="submit" class="btn btn-primary" data-enchanter="finish">Finish</button>
</form>

3. Initialize Enchanter

Add this to your JavaScript file:

// Pass the form's ID attribute as a parameter
const enchanter = new Enchanter('registration');

That's it! Your form wizard is now ready to use.

Advanced Features

Add form validation

Validate form data before moving to the next step using the onNext callback:

const wizard = new Enchanter('registration', {}, {
  onNext: () => {
    // Perform validation here
    if (!formIsValid()) {
      return false; // Stay on current step
    }
    return true; // Proceed to next step
  }
});

Example with jQuery Validation Plugin:

⚠️ This example requires jQuery and jQuery Validation plugin to be installed.

const wizard = new Enchanter('registration', {}, {
  onNext: () => {
    if (!$('#registration').valid()) {
      return false;
    }
  }
});

Hide the Navigation Bar

Hide the step tabs to prevent direct navigation between steps:

// Pass the form ID as the first parameter
const wizard = new Enchanter('registration', {
  hideNav: true
});

Use this if you want to:

  • Enforce sequential step navigation
  • Implement a custom progress bar
  • Create a custom title display

Project status

Enchanter is battle-tested and production-ready. It has been actively used in production for 4+ years across mission-critical applications:

  • Sinaxys — A healthcare platform handling sensitive data and medical workflows;
  • ContaExpert — An accounting software managing financial records, employees and payrolls for thousands of businesses.

The codebase is stable, well-maintained, and trusted by companies processing real, mission-critical business data every single day.

Roadmap

I'm planning these improvements:

  • [ ] Merge default options with user options: new Enchanter('form_id', { option1: 'value', option2: 'value' })
  • [ ] Built-in form validation without external plugins
  • [ ] Option to disable direct clicks on .nav-link (enforce Next/Prev buttons)

Contributing

Found a bug? Have a suggestion? I'd love to hear from you! Feel free to open an issue or contribute to the project.

Are you using Enchanter? Let me know on GitHub!