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

ontheway-sdk

v0.3.0

Published

Lightweight onboarding SDK based on Driver.js

Downloads

328

Readme

@ontheway/sdk

Lightweight onboarding SDK based on Driver.js. Create interactive product tours and onboarding flows.

Installation

npm install @ontheway/sdk driver.js
# or
pnpm add @ontheway/sdk driver.js

Note: driver.js is a peer dependency. The SDK automatically injects Driver.js CSS from CDN at runtime. To disable this behavior, pass driverCssUrl: false and import the CSS yourself.

Usage

Vanilla JavaScript / TypeScript

import { OnTheWay } from '@ontheway/sdk'

const otw = new OnTheWay({
  projectId: 'YOUR_PROJECT_ID',
  apiUrl: 'https://your-api.com/api',
  onComplete: (taskId) => console.log('Completed:', taskId),
  onSkip: (taskId, stepIndex) => console.log('Skipped:', taskId, 'at step', stepIndex),
})

// Start a specific tour
otw.start('welcome-tour')

// Reset a task
otw.reset('welcome-tour')

// Reset all tasks
otw.resetAll()

React

import { OnTheWayProvider, useOnTheWay } from '@ontheway/sdk/react'

function App() {
  return (
    <OnTheWayProvider projectId="YOUR_PROJECT_ID">
      <YourApp />
    </OnTheWayProvider>
  )
}

function HelpButton() {
  const { start, ready } = useOnTheWay()
  return (
    <button onClick={() => start('welcome-tour')} disabled={!ready}>
      Show Tour
    </button>
  )
}

Components

import { HelpMenu, HelpTrigger } from '@ontheway/sdk/components'

// Floating help menu with all available tours
<HelpMenu position="bottom-right" />

// Inline trigger for a specific tour
<HelpTrigger taskSlug="welcome-tour">
  <button>Need help?</button>
</HelpTrigger>

DevTools (Development Only)

import { OnTheWayDevToolsPanel } from '@ontheway/sdk/devtools'

// Add to your app root in development
{process.env.NODE_ENV === 'development' && (
  <OnTheWayDevToolsPanel
    projectId="YOUR_PROJECT_ID"
    apiKey="otw_YOUR_API_KEY"
  />
)}

Configuration

| Option | Type | Default | Description | |--------|------|---------|-------------| | projectId | string | — | Required. Your project ID | | apiUrl | string | '/api' | API base URL | | driverCssUrl | string \| false | CDN URL | Custom CSS URL, or false to disable auto-injection | | onComplete | (taskId: string) => void | — | Callback when a task is completed | | onSkip | (taskId: string, stepIndex: number) => void | — | Callback when a task is skipped |

Driver.js CSS

By default, the SDK injects the Driver.js CSS from CDN at runtime. You can:

  1. Let it auto-inject (default behavior, no action needed)
  2. Provide a custom URL: new OnTheWay({ projectId: '...', driverCssUrl: 'https://...' })
  3. Disable and import manually: new OnTheWay({ projectId: '...', driverCssUrl: false }) then add import 'driver.js/dist/driver.css' yourself

License

MIT