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

storybook-addon-profiler

v1.1.1

Published

A performance profiler panel addon for Storybook — real-time FPS, INP, CLS, memory and more. Works with all Storybook frameworks.

Readme

storybook-addon-profiler

npm license CI npm downloads TypeScript OpenSSF Scorecard

Real-time browser performance metrics inside your Storybook panel. Works with every Storybook framework: React, Vue, Angular, Svelte, Preact, HTML, web-components, and Solid.

Performance Profiler Demo


Install

npm install -D storybook-addon-profiler
# or
bun add -D storybook-addon-profiler

Register in .storybook/main.ts:

const config = {
  addons: ["storybook-addon-profiler"]
}
export default config

That's it. The ⚡ Performance panel appears automatically and decorates every story.


What you get

The panel updates every 50 ms while a story is active. Metrics are grouped into collapsible sections:

| Section | Metrics | | -------------------------- | -------------------------------------------------------------------------------- | | Frame & Paint | FPS, frame time, dropped frames, frame jitter, stability, paint time | | Input & Responsiveness | INP, FID, pointer latency, per-interaction timing breakdown (wait / JS / paint) | | Main Thread | Long Tasks, Total Blocking Time (TBT), DOM thrashing, mutation churn | | Long Animation Frames | LoAF count, total blocking duration, P95, top script attribution (Chrome 123+) | | Layout & Stability | CLS, forced reflows, style writes, CSS variable mutations | | Memory & Rendering | JS heap, heap delta, GC pressure, DOM nodes, compositor layers (Chromium) | | Element Timing | Per-element time-to-DOM for elements marked data-profiler="..." |

Values are color-coded against Web Vitals thresholds (green / amber / red) so slow paths are immediately visible.

Inspect

Click the 🔍 button next to any slow interaction target to flash-highlight the element in the preview iframe.

Reset

Hit the reset button in the panel toolbar to clear all collector baselines mid-story without reloading.


Element Timing (opt-in)

Add the data-profiler attribute to any element you want to track individually:

<img data-profiler="hero-image" src="..." />
<div data-profiler="above-fold-content">...</div>

In React/TSX stories the attribute is valid JSX out of the box:

<img data-profiler="hero-image" src={heroSrc} />
<MyComponent data-profiler="my-component" />

The Element Timing section lists each element's time from story render start to DOM insertion, sorted slowest first. Deduplication is by name; only the first appearance of each name is recorded per render.


Manual decorator

The preset applies withPerformanceMonitor globally. To apply it to a single story file instead:

import { withPerformanceMonitor } from "storybook-addon-profiler/decorator"

export default {
  title: "MyComponent",
  decorators: [withPerformanceMonitor]
}

Browser compatibility

| Feature | Chrome | Edge | Brave | Firefox | Safari | | --------------------------------- | ---------- | ---------- | ---------- | ------- | ------ | | Core metrics (FPS, TBT, CLS, INP) | ✅ | ✅ | ✅ | ✅ | ✅ | | Long Animation Frames | ✅ (123+) | ✅ (123+) | ✅ (123+) | ❌ | ❌ | | JS heap memory | ✅ | ✅ | ✅ | ❌ | ❌ | | Element Timing | ✅ | ✅ | ✅ | ❌ | ❌ |

All collectors degrade gracefully; unsupported metrics show a "not available" badge rather than erroring.


Supported Storybook frameworks

react · vue3 · angular · svelte · preact · html · web-components · solid

Requires Storybook 8+.


Architecture

See ARCHITECTURE.md for a full breakdown of the collector system, channel protocol, and manager panel.


License

Apache 2.0. See LICENSE for details.