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

@waysnx/ui-visualization

v0.1.5

Published

Enterprise-grade visualization components for React — OrgChart, Tree, Hierarchy, and more. Built on a high-performance engine with virtualization, zoom/pan, and full accessibility.

Readme

@waysnx/ui-visualization

🤖 AI agents & LLMs: See LLM.md (shipped with this package) for a structured integration guide — OrgChart, Tree, Hierarchy with virtualization and zoom/pan.

Enterprise-grade visualization components for React.
Org charts, trees, hierarchies, and more — built on a high-performance engine with virtualization, zoom/pan, search, drag & drop, and full accessibility.


Installation

npm install @waysnx/ui-visualization

Import styles in your app entry:

import '@waysnx/ui-visualization/dist/index.css';

Quick Start

OrgChart

import { OrgChart } from '@waysnx/ui-visualization';
import '@waysnx/ui-visualization/dist/index.css';

const nodes = [
  { id: '1', label: 'Emma Johnson', subtitle: 'CEO' },
  { id: '2', label: 'Liam Anderson', subtitle: 'COO', parentId: '1' },
  { id: '3', label: 'Olivia Martinez', subtitle: 'CTO', parentId: '1' },
  { id: '4', label: 'Noah Williams', subtitle: 'CFO', parentId: '1' },
  { id: '5', label: 'Ava Thompson', subtitle: 'Ops Manager', parentId: '2' },
];

function App() {
  return (
    <OrgChart
      nodes={nodes}
      height="600px"
      onNodeClick={({ node }) => console.log(node)}
    />
  );
}

Tree

import { Tree } from '@waysnx/ui-visualization';

<Tree nodes={nodes} height="500px" />

Hierarchy

import { Hierarchy } from '@waysnx/ui-visualization';

<Hierarchy nodes={nodes} height="600px" showMiniMap showToolbar />

Components

| Component | Description | |---|---| | OrgChart | Full org chart with toolbar, search, minimap, drag & drop | | Hierarchy | Multi-level top-down hierarchy | | Tree | Expandable left-right tree | | TreeNode | Individual node — use for custom rendering | | Connector | SVG edge between two nodes | | MiniMap | Overview navigation panel | | Toolbar | Action toolbar (zoom, expand, export) | | SearchBox | Instant node search with prev/next navigation | | ZoomControls | Zoom in/out/fit buttons | | Legend | Color/symbol legend |


Hooks

| Hook | Description | |---|---| | useVisualization | Core engine — nodes, layout, expand/collapse | | useZoom | Zoom and pan state | | useSelection | Single, multiple, range selection | | useSearch | Search and highlight nodes | | useDragDrop | Drag & drop with custom drop rules | | useMiniMap | MiniMap viewport state | | useExport | Export as PNG / SVG / JSON | | useTheme | Light / dark / auto theme |


Engines

| Engine | Description | |---|---| | LayoutEngine | Computes node positions (top-down, left-right, radial, compact) | | VirtualizationEngine | Renders only visible nodes for 10K+ node performance | | SearchEngine | Fast full-text search with scoring and navigation | | ExportEngine | PNG, SVG, PDF (via jsPDF), JSON export |


Node Data Shape

interface VisNode {
  id: string;
  label: string;
  parentId?: string;       // links to parent for auto-layout
  subtitle?: string;       // job title, description, etc.
  avatarUrl?: string;      // profile image
  badge?: string | number; // badge text or count
  status?: 'online' | 'offline' | 'away' | 'busy';
  expanded?: boolean;      // expand/collapse state
  data?: Record<string, unknown>; // arbitrary metadata
}

Configuration

<OrgChart
  nodes={nodes}
  config={{
    layout: {
      direction: 'top-down',   // 'top-down' | 'left-right' | 'radial' | 'compact'
      nodeWidth: 220,
      nodeHeight: 80,
      nodeGapX: 40,
      nodeGapY: 60,
    },
    selection: 'multiple',     // 'single' | 'multiple' | 'range' | 'none'
    enableDragDrop: true,
    enableSearch: true,
    enableMiniMap: true,
    virtualize: true,
    virtualizeThreshold: 200,
    theme: 'auto',             // 'light' | 'dark' | 'auto'
  }}
/>

Custom Node Rendering

<OrgChart
  nodes={nodes}
  renderNode={(node) => (
    <div style={{ padding: 12 }}>
      <strong>{node.label}</strong>
      <p>{node.subtitle}</p>
    </div>
  )}
/>

Theming

All visual properties are CSS custom properties with --wx-vis- prefix:

:root {
  --wx-vis-node-bg: #ffffff;
  --wx-vis-node-border-radius: 12px;
  --wx-vis-edge-color: #cbd5e1;
  --wx-vis-status-online: #22c55e;
  /* ... see tokens.css for full list */
}

Accessibility

  • Full keyboard navigation (Arrow keys, Enter, Space, Escape)
  • ARIA roles: tree, treeitem, toolbar, search, navigation
  • aria-selected, aria-expanded, aria-label on all interactive elements
  • Focus visible outlines on all focusable elements
  • WCAG 2.1 AA compliant

Performance

  • Virtualization engine renders only visible nodes
  • will-change: transform on the canvas transform layer
  • Memoized layout computation via useMemo
  • Tree structure built once and diffed on state changes

License

Apache License 2.0 © WaysNX Technologies Private Limited