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

@rasenganjs/kage-demo

v1.0.1

Published

Kage Demo is a tool that helps developers create interactive feature tours and animated onboarding experiences for React apps

Readme

@rasenganjs/kage-demo

✨ Build beautiful guided product tours for your Rasengan.js apps

@rasenganjs/kage-demo is a lightweight, framework-native library that allows you to create guided step-by-step demos, onboarding flows, and product tours inside your Rasengan.js application.

It highlights UI elements, overlays the screen, and displays custom tooltips — all with smooth transitions, precise positioning, and full control over the rendering of each step.

Perfect for: ✔ Onboarding new users ✔ Showcasing features ✔ Product tours ✔ Interactive tutorials ✔ Demo walkthroughs


🚀 Installation

pnpm add @rasenganjs/kage-demo

📦 Basic Usage

You define your demo steps as an array of KageDemoStep, each with:

  • target: a CSS selector pointing to the DOM element to highlight
  • render: a function returning your custom tooltip component

Here's a full working example:

import Step01 from '@/components/demo/step-01';
import Step02 from '@/components/demo/step-02';
import KageDemoContainer, {
  useKageDemo,
  KageDemoStep,
} from '@rasenganjs/kage-demo';

const steps: KageDemoStep[] = [
  {
    target: '#get-started',
    render: (props) => <Step01 {...props} />,
  },
  {
    target: '#end',
    render: (props) => <Step02 {...props} />,
  },
];

export default function Page() {
  const props = useKageDemo(steps);

  return (
    <>
      <section className="w-screen h-screen bg-blue-300 flex flex-col justify-center items-center">
        <KageDemoContainer {...props} />

        <div className="p-4 flex flex-col items-center gap-2">
          <button id="get-started">Get Started</button>

          <button
            onClick={props.start}
            className="bg-black text-white py-2 px-4 rounded-lg"
          >
            Start
          </button>
          <p id="end">End demo</p>
        </div>
      </section>
    </>
  );
}

🧩 What is a Step?

Each step describes:

🔍 The target

target: '#end';

This element will be highlighted and centered on screen.

💬 The tooltip component

render: (props) => <Step01 {...props} />;

Your component receives these props:

{
  next: () => void,
  prev: () => void,
  end: () => void
}

This gives you full freedom to style the tooltip however you want.


🧠 The useKageDemo Hook

const props = useKageDemo(steps);

This hook returns:

| Name | Description | | --------- | ---------------------------------------------- | | start() | Starts the demo | | stop() | Stops the demo | | next() | Moves to the next step | | prev() | Moves to the previous step | | active | Whether a step is active | | index | Current step index | | rect | The current highlighted element’s bounding box |

You pass these props directly to:

<KageDemoContainer {...props} />

🖼️ Kage Demo Container

This component handles:

  • the overlay
  • the cut-out mask
  • the transitions
  • the tooltip positioning
  • the scroll-into-view logic

Simply place it once in your page:

<KageDemoContainer {...props} />

✨ Features

  • 🎯 Smart target detection
  • 🖼️ Dynamic overlay with cut-out
  • 🎢 Smooth transitions
  • 🧲 Auto-scrolling
  • 🎨 Fully customizable tooltips
  • ⚡ Minimal performance impact
  • 🧱 Framework-native (no external dependencies)

🧪 Example of a Custom Step Component

export default function Step01({ next, end }) {
  return (
    <div className="p-4 bg-white rounded-xl shadow-lg space-y-3">
      <h2 className="text-lg font-semibold">Welcome!</h2>
      <p>This is the first step of your guided demo.</p>

      <div className="flex gap-2">
        <button
          onClick={next}
          className="px-3 py-2 bg-black text-white rounded-lg"
        >
          Next →
        </button>
        <button onClick={end} className="px-3 py-2 bg-gray-200 rounded-lg">
          Skip
        </button>
      </div>
    </div>
  );
}

📄 License

Licensed under the MIT License. Part of the Rasengan.js ecosystem