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

steppp

v0.0.2

Published

Easy, lightweight multi-step experiences.

Readme

Steppp

Easy, lightweight multi-step experiences.

Usage

Setting Up Steps

Define steps in your HTML and set an data-steppp-active attribute on the initial active step. Steps can be configured in two ways -- either as direct children of a target element:

<div id="steppp">
  <section data-steppp-active>first</section>
  <section>second</section>
  <section>third</section>
</div>

...or within an element with a data-steppp-wrapper attached.

<div id="steppp">
  <div data-stepppp-wrapper>
    <section data-steppp-active>first</section>
    <section>second</section>
    <section>third</section>
  </div>
</div>

Moving From Step to Step

Steppp comes with two API approaches -- an imperative (you dictate when it'll advance in your code) and declarative (behavior is described by setting various data-steppp-* attributes).

Imperative API

Create a new instance by calling Steppp and passing a target element. Functions will be returned for moving forward, backward, or directly to a specific step (see more on this below).

const element = document.getElementById("targetElement");
const { forward, backward, moveTo } = Steppp(element);

document.querySelector("#forward").addEventListener("click", () => {
  forward();
});

document.querySelector("#backward").addEventListener("click", () => {
  backward();
});

document.querySelector("#moveToStepA").addEventListener("click", () => {
  moveTo("step_a");
});

Declarative API

The declarative approach requires you to create a new instance of Steppp like before, and then place specific data-steppp-* attributes in your markup. The elements on which these attributes are placed must exist as children to the target element. As such, wrapping your steps within data-steppp-wrapper is required using this approach.

const element = document.getElementById("targetElement");
Steppp(element);

Attach data-steppp-forward and data-steppp-backward attributes to elements in order to move those respective directions:

<div id="steppp">
  <div data-stepppp-wrapper>
    <section data-steppp-active>first</section>
    <!-- ...other steps -->
  </div>

  <button data-steppp-forward>Forward</button>
  <button data-steppp-backward>Backward</button>
</div>

You can also specify step names to jump directly from one step to another regardless of their "natural" order:

<div id="steppp">
  <div data-stepppp-wrapper>
    <section data-steppp-active>
      some step
      <button data-steppp-to="third_step">Go to Step</button>
    </section>
    <!-- ...other steps -->
    <section data-steppp-name="third_step">another step</section>
  </div>
  <button data-steppp-backward>Backward</button>
</div>

Custom Events

Steppp provides several custom events that you can listen for and hook into.

const element = document.getElementById("targetElement");
Steppp(element);
element.addEventListener("steppp:complete", (event) => {
  const { oldStep, newStep, element } = event.detail;
  // do something cool now that the step transition is complete
});

Available Events

These are the events you can hook into:

| Event Name | Description | | --------------- | -------------------------------------------------------------------------------------------------- | | steppp:invalid | This event fires when a step transition fails to start because the current step is invalid. | | steppp:abort | This event fires when a step transition fails to start because the next step cannot be determined. | | steppp:start | This event fires when a step transition starts. | | steppp:complete | This event fires when a step transition completes. |