No description
  • TypeScript 83.8%
  • MDX 10.3%
  • CSS 5.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ned Schwartz b486d9ff86
Merge pull request #144 from github/dependabot/npm_and_yarn/production-dependencies-acdb6cc25b
chore(deps): bump the production-dependencies group across 1 directory with 7 updates
2026-07-17 17:05:44 +00:00
.changeset chore: version packages 2026-02-26 19:28:23 +00:00
.devcontainer chore: optimize devcontainer for prebuilds and add canary releases 2026-02-23 15:41:20 +00:00
.github chore(deps): bump actions/setup-node from 6 to 7 in the actions group 2026-07-16 20:33:44 +00:00
packages chore(deps): bump the production-dependencies group across 1 directory with 7 updates 2026-07-16 20:34:29 +00:00
.gitignore typed css modules 2026-02-22 19:07:46 +00:00
.npmrc update docs more 2026-02-22 16:04:05 +00:00
.nvmrc fix 2026-05-22 15:33:48 +00:00
.prettierrc.json format 2026-02-19 14:26:50 +00:00
CODE_OF_CONDUCT.md improve docs and strucutre 2026-02-19 17:05:00 +00:00
CODEOWNERS Create CODEOWNERS 2026-02-19 16:44:19 -05:00
CONTRIBUTING.md feat: add examples-html package and update docs for universal support 2026-02-22 22:13:23 +00:00
eslint.config.ts fix: allow preset.js in ESLint project service via allowDefaultProject 2026-02-26 19:11:41 +00:00
LICENSE improve docs and strucutre 2026-02-19 17:05:00 +00:00
package-lock.json chore(deps): bump the production-dependencies group across 1 directory with 7 updates 2026-07-16 20:34:29 +00:00
package.json chore(deps-dev): bump the dev-dependencies group across 1 directory with 10 updates 2026-07-02 20:35:15 +00:00
PUBLISHING.md docs: add PUBLISHING.md with release workflow documentation 2026-02-20 16:39:34 +00:00
README.md Merge branch 'main' into universal-split 2026-02-24 12:27:43 -05:00
SECURITY.md improve docs and strucutre 2026-02-19 17:05:00 +00:00
SUPPORT.md improve docs and strucutre 2026-02-19 17:05:00 +00:00
tsconfig.json format 2026-02-19 14:59:01 +00:00

@github-ui/storybook-addon-performance-panel

A Storybook addon that provides real-time performance monitoring for stories. It displays comprehensive metrics including frame timing, input responsiveness, memory usage, React profiling, and more.

Performance panel showing all metric sections in Storybook

Quick Start

React projects

Add the addon to your Storybook configuration:

// .storybook/main.ts
const config = {
  addons: [
    '@github-ui/storybook-addon-performance-panel',
  ],
}
// .storybook/preview.ts
import addonPerformancePanel from '@github-ui/storybook-addon-performance-panel'
import {definePreview} from '@storybook/react-vite'

export default definePreview({
  addons: [addonPerformancePanel()],
})

Non-React projects (HTML, Vue, Svelte, Web Components, etc.)

Use the ./universal subpath — no React dependency:

// .storybook/main.ts
const config = {
  addons: [
    '@github-ui/storybook-addon-performance-panel/universal',
  ],
}
// .storybook/preview.ts
import addonPerformancePanel from '@github-ui/storybook-addon-performance-panel/universal'
import {definePreview} from '@storybook/html-vite' // or vue-vite, svelte-vite, etc.

export default definePreview({
  addons: [addonPerformancePanel()],
})

The universal entry collects all browser-level metrics (frame timing, CLS, INP, etc.) but omits React Profiler metrics. The React Performance section is automatically hidden in the panel.

The performance panel appears as a " Performance" tab at the bottom of Storybook.

Project Structure

This is an npm workspaces monorepo:

Package Description
packages/storybook-addon-performance-panel The addon — collectors, panel UI, and types
packages/examples-react React docs storybook (@storybook/react-vite)
packages/examples-html HTML docs storybook (@storybook/html-vite)
packages/storybook-config Shared storybook config (theming, features, Vite helpers)
packages/website Documentation site (TanStack Start + MDX)

Documentation

See the addon README for full documentation including:

  • Architecture and how the addon works
  • All metrics collected (frame timing, input, main thread, LoAF, CLS, React, memory)
  • Metric thresholds and color coding
  • Browser compatibility
  • Interpreting metrics and troubleshooting guide

Development

npm install          # Install dependencies
npm run build        # Build the addon
npm test             # Run tests
npm run lint         # Lint
npm run tsc          # Type check
npm run dev          # Build + start storybooks and site with portless
                     # → http://examples-react.localhost:1355 (React)
                     # → http://examples-html.localhost:1355 (HTML)
                     # → http://site.localhost:1355 (Docs site)
npm run docs         # Start just the React docs storybook
npm run docs:html    # Start just the HTML docs storybook

Contributing

See CONTRIBUTING.md for development setup and pull request guidelines.

License

MIT