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

@eventcatalog/visualizer

v0.0.6

Published

ReactFlow nodes and visualizer components for EventCatalog Visualizer and Studio

Readme

@eventcatalog/visualizer

React components for visualizing EventCatalog nodes, built for ReactFlow.

Installation

npm install @eventcatalog/visualizer
# or
pnpm add @eventcatalog/visualizer

Setup

1. Import the CSS (Required)

The components use Tailwind CSS classes. Import the CSS file in your main CSS file:

/* In your main CSS file (e.g., globals.css, index.css) */
@import '@eventcatalog/visualizer/dist/styles.css';

2. Configure Tailwind (Required for proper styling)

The visualizer components use Tailwind CSS classes. You must configure your build system to include these classes:

For Tailwind CSS v4 (PostCSS):

Add the visualizer package to your postcss.config.js:

export default {
  plugins: {
    "@tailwindcss/postcss": {
      content: [
        // ... your existing paths
        './node_modules/@eventcatalog/visualizer/dist/**/*.{js,mjs}',
        './node_modules/@eventcatalog/visualizer/src/**/*.{js,ts,jsx,tsx}',
      ],
    },
  },
};

For Tailwind CSS v3 (Config file):

Add the visualizer package to your content paths in tailwind.config.js:

module.exports = {
  content: [
    // ... your existing paths
    './node_modules/@eventcatalog/visualizer/dist/**/*.{js,mjs}',
    './node_modules/@eventcatalog/visualizer/src/**/*.{js,ts,jsx,tsx}',
  ],
  // ... rest of config
}

⚠️ Important: Without this configuration, the Tailwind classes used by the visualizer components will be purged from your CSS build, resulting in unstyled components.

Usage

Basic EventNode

import { EventNode } from '@eventcatalog/visualizer';

// Use as standalone component
<EventNode
  id="event-1"
  data={{
    name: "User Registered",
    version: "1.0.0",
    summary: "Fired when a user registers for the first time",
    mode: "full",
    owners: ["team-auth", "team-users"],
    sends: ["user-profile-updated"],
    receives: ["user-registration-request"]
  }}
  selected={false}
/>

Standalone Usage

The EventNode is a pure visual component that can be used anywhere:

import { EventNode } from '@eventcatalog/visualizer';

<EventNode
  id="event-1"
  data={{
    name: "User Registered",
    version: "1.0.0",
    summary: "Fired when a user registers for the first time",
    mode: "full",
  }}
  selected={false}
/>

With ReactFlow

For ReactFlow integration, wrap the EventNode with ReactFlow handles:

import { ReactFlow, Handle, Position } from '@xyflow/react';
import { EventNode } from '@eventcatalog/visualizer';

// Create a ReactFlow node wrapper
function ReactFlowEventNode(props) {
  const { id, data, selected } = props;
  return (
    <>
      <Handle type="target" position={Position.Left} />
      <Handle type="source" position={Position.Right} />
      <EventNode id={id} data={data} selected={selected} />
    </>
  );
}

const nodeTypes = {
  event: ReactFlowEventNode,
};

const nodes = [
  {
    id: '1',
    type: 'event',
    position: { x: 100, y: 100 },
    data: {
      name: 'User Registered',
      version: '1.0.0',
      summary: 'Fired when a user registers',
      mode: 'full',
    },
  },
];

export default function MyFlow() {
  return (
    <ReactFlow
      nodes={nodes}
      nodeTypes={nodeTypes}
    />
  );
}

Node Configuration

The visualizer also exports node configurations:

import { eventConfig } from '@eventcatalog/visualizer';

// Access node metadata
console.log(eventConfig.type); // 'event'
console.log(eventConfig.color); // 'orange'
console.log(eventConfig.icon); // Zap component

Props

EventNodeProps

| Prop | Type | Default | Description | |------|------|---------|-------------| | id | string | required | Node ID | | data | EventNodeData | required | Node data | | selected | boolean | false | Whether node is selected |

EventNodeData

| Property | Type | Description | |----------|------|-------------| | name | string | Event name | | version | string | Event version | | summary | string | Event description | | mode | 'simple' \| 'full' | Display mode | | owners | string[] | Event owners | | sends | string[] | Messages this event sends | | receives | string[] | Messages this event receives |

Styling

Components are styled with Tailwind CSS classes. The package includes:

  • Tailwind Classes: All standard Tailwind utilities used in components
  • Custom CSS: Minimal custom styles exported in dist/styles.css
  • Responsive: Components work across different screen sizes
  • Themeable: Easy to customize with Tailwind's theming system

Features

  • Pure Visual Component: Clean separation between visual and ReactFlow concerns
  • Standalone Usage: Works perfectly outside ReactFlow contexts
  • TypeScript: Full TypeScript support with proper types
  • Self-Contained Styling: Complete CSS bundle with all required Tailwind classes
  • Configurable: Support for simple and full display modes
  • Framework Agnostic: Can be wrapped for any flow library (ReactFlow, etc.)
  • Zero Dependencies: No ReactFlow dependency, just pure React component