Skip to main content

Storybook addon

The walkerOS Storybook addon integrates event tracking visualization into Storybook. It enables developers to inspect walker attributes, monitor real-time events, and visually highlight tagged elements while building components.

Installation

Loading...

Setup

Register the addon in your Storybook configuration:

Loading...

Configuration

Optionally customize the addon behavior in your preview file:

Loading...
OptionTypeDefaultDescription
prefixstring'data-elb'Data attribute prefix for walker attributes
autoRefreshbooleantrueAutomatically refresh events when story or controls change

Features

The addon panel provides three tabs for inspecting walkerOS data:

Events tab

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

Live events tab

Captures events in real-time as you interact with components. Shows timestamps for each event and stores up to 50 events. Use the "Clear" button to reset.

Attributes tab

Shows a hierarchical tree view of all walker attributes found in the DOM:

  • Element paths and HTML tags
  • Expandable/collapsible structure
  • Click to view element markup
  • Attribute counts by type

Visual highlighting

Toggle buttons highlight elements with different attribute types:

AttributeColorData Attribute
GlobalsCyandata-elbglobals
ContextYellowdata-elbcontext
EntityGreendata-elb
PropertyReddata-elb-*
ActionPurpledata-elbaction

Multiple highlights can be active simultaneously, displaying layered outlines.

Usage in stories

Import dataElbArgTypes to add walkerOS controls to your stories:

Loading...

Troubleshooting

No events detected:

  • Verify components have data-elb attributes
  • Check the prefix matches your configuration
  • Click "Update events" to manually refresh

Highlights not showing:

  • Ensure the story iframe has loaded
  • Toggle highlights off and on again
  • Check browser console for errors

Next steps

💡 Need Professional Support?
Need professional support with your walkerOS implementation? Check out our services.