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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@walkeros/storybook-addon

v0.4.0

Published

Visualize, debug, and validate walkerOS event tracking in your Storybook stories. Real-time event capture with visual DOM highlighting for data-attribute based tagging.

Readme

@walkeros/storybook-addon

A Storybook addon that integrates walkerOS tagging support for data collection and tracking validation. Visualize, debug, and validate walkerOS events in your stories.

Features

  • 📊 Events Tab: View all detected walkerOS events with JSON syntax highlighting
  • 🔴 Live Events Tab: Real-time event capture as you interact with components
  • 🎯 Visual Highlighting: Toggle highlights for Context, Entity, Property, and Action attributes
  • 🔄 Auto-refresh: Updates automatically when navigating stories or changing controls
  • ⚙️ Custom Prefix Support: Configure custom data attribute prefixes
  • 🚀 Zero Configuration: Works out of the box with walkerOS data attributes

Compatibility

| Addon Version | Storybook Version | Status | | ------------- | ----------------- | --------------------------- | | ^0.2.x | ^9.0.0 | ✅ Current (Active Support) | | ^1.0.0 | ^10.0.0 | 📋 Planned |

Note: Storybook 10 support is planned for v1.0.0. See STORYBOOK_10_MIGRATION.md for migration details.

Installation

npm install --save-dev @walkeros/storybook-addon
// .storybook/main.ts
const config: StorybookConfig = {
  addons: ['@walkeros/storybook-addon'],
};

Usage

Basic Setup

  1. Install and register the addon
  2. Add walkerOS tracking to your components:
import { tagger } from '../utils/tagger';

export const Button = ({ label, onClick }) => {
  const trackingProps = tagger('button').data({ label }).action('click').get();

  return (
    <button {...trackingProps} onClick={onClick}>
      {label}
    </button>
  );
};
  1. Use in stories:
export const Primary: Story = {
  args: {
    label: 'Button',
    dataElb: {
      entity: 'button',
      action: 'click',
      data: { category: 'primary' },
    },
  },
};

Custom Prefix Configuration

Configure a custom prefix in your Storybook preview:

// .storybook/preview.ts
const preview: Preview = {
  parameters: {
    walkerOS: {
      prefix: 'data-elb',
      autoRefresh: true,
    },
  },
};

Update your tagger configuration to match:

// utils/tagger.ts
const taggerInstance = createTagger({
  prefix: 'data-elb',
});

Addon Panels

Events Tab

Shows all walkerOS events detected in the current story's DOM. Click "Update events" to manually refresh.

Live Events Tab

Captures events in real-time as you interact with components. Events are automatically sent to the panel via the walker collector.

Visual Highlighting

Use the highlight toggles to visually identify different types of walkerOS attributes:

  • Context: Yellow outline for context attributes
  • Entity: Green outline for entity attributes
  • Property: Red outline for property attributes
  • Action: Purple outline for action attributes

API Reference

import { DataElb, dataElbArgTypes } from '@walkeros/storybook-addon';

DataElb Interface

interface DataElb {
  entity?: string;
  trigger?: string;
  action?: string;
  data?: WalkerOS.Properties;
  context?: WalkerOS.Properties;
  globals?: WalkerOS.Properties;
  link?: Record<string, string>;
}

Story ArgTypes

export default {
  argTypes: {
    ...dataElbArgTypes,
    // Adds a walkerOS object control to your story
  },
};

Configuration

| Option | Type | Default | Description | | ------------- | --------- | ------------ | ---------------------------------------------------- | | prefix | string | 'data-elb' | Data attribute prefix (must match your walker setup) | | autoRefresh | boolean | true | Auto-refresh events on story/control changes |

Troubleshooting

Events Not Showing

  • Ensure components have walkerOS attributes: data-elb, data-elb-*, etc.
  • Check prefix matches between addon config and tagger config
  • Try manual refresh with "Update events" button

Live Events Not Working

  • Verify walker is properly initialized with matching prefix
  • Check browser console for walker initialization errors
  • Ensure components generate events when clicked/interacted with

Highlighting Not Working

  • Confirm prefix configuration matches in both addon and tagger
  • Check that elements have the expected data attributes in DOM inspector

License

MIT © elbwalker GmbH

Links