Skip to content
PluginStats

xray-react weekly downloads statistics

By loogle18 · npm · Webpack plugins

React layout debugger inspired by Xray-rails.

View on npm Fresh · Dec 6, 2026

xray-react has 47 recorded weekly downloads on npm, a decrease of 20.3% over the past 30 days, ranking #2786 of 3,247 tracked listings.

Weekly downloads
47
Official API · Dec 5, 2026
7-day growth
0.0%
0 weekly downloads
30-day growth
-20.3%
-12 weekly downloads
90-day growth
+80.8%
+21 weekly downloads
Rank
#2786
▼ 156 in 7 days

About xray-react

Banner

X-Ray React

npm version downloads license

React UI layout debugging tool inspired by Xray-rails

Overview

Xray-react is a development tool that reveals your React UI's component structure. Press Cmd+Shift+X (Mac) or Ctrl+Shift+X (Windows/Linux) to reveal an overlay of the React components that rendered your UI, and click any component to open its source file in your editor.

Full Mode (default)

Full Mode Example

Simple Mode

Simple Mode Example

Features

  • React 18+ Support - Works with React 18+ using React DevTools protocol, with fallback support for React <18
  • Multi-Bundler Support - Works with Webpack and Vite
  • TypeScript Support - Supports .js, .jsx, .ts, and .tsx files
  • Smart Component Filtering - Automatically filters out external library components, showing only your project's components
  • Component Hierarchy Display - Shows full component path from parent to child (e.g., Page -> Layout -> Component)
  • Modern UI - Clean overlay interface with component search and scrollable component paths
  • Editor Integration - Automatic detection for VSCode, WebStorm, Cursor, Sublime, and more
  • Fast & Lightweight - Minimal performance impact

Requirements

  • Node.js: >= 22.0.0
  • React: >= 16.0.0 (React 18+ recommended for best experience)

Installation

npm install --save-dev xray-react

Usage

Webpack
// webpack.config.js
import { XrayReactWebpackPlugin } from 'xray-react';

export default {
  // ... your config
  plugins: [
    // ... other plugins
    ...(process.env.NODE_ENV === 'development' ? [
      new XrayReactWebpackPlugin({
        output: 'bundle.js', // optional: specify output filename
        server: true, // optional: enable Socket.IO server (default: true)
        sourcePath: '/path/to/src', // optional: specify source path
        port: 9000, // optional: specify port (default: 8124)
        mode: 'full' // optional: 'full' or 'simple' (default: 'full')
      })
    ] : [])
  ]
};

Legacy export (backward compatibility):

const { XrayReactPlugin } = require('xray-react');
// XrayReactPlugin is an alias for XrayReactWebpackPlugin
Vite
// vite.config.js
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { xrayReactVitePlugin } from 'xray-react';

export default defineConfig(({ mode }) => ({
  plugins: [
    react(),
    ...(mode === 'development' ? [
      xrayReactVitePlugin({
        server: true, // optional: enable Socket.IO server (default: true)
        sourcePath: '/path/to/src', // optional: specify source path
        port: 9000, // optional: specify port (default: 8124)
        mode: 'full' // optional: 'full' or 'simple' (default: 'full')
      })
    ] : [])
  ]
}));
Next.js

For Next.js applications, you can use either the webpack plugin or manual imports.

Using Webpack Plugin

The webpack plugin automatically detects Next.js client builds and injects scripts into the appropriate chunks.

Configure xray-react in next.config.js:

// next.config.js
import { XrayReactWebpackPlugin } from 'xray-react';

export default {
  webpack: (config, { dev, isServer }) => {
    if (dev && !isServer) {
      config.plugins.push(
        new XrayReactWebpackPlugin({
          server: true, // optional: enable Socket.IO server (default: true)
          sourcePath: process.cwd(), // optional: specify source path
          port: 9000, // optional: specify port (default: 8124)
          mode: 'full' // optional: 'full' or 'simple' (default: 'full')
        })
      );
    }
    return config;
  }
};
Manual Import (Without Plugin)

If you're not using a bundler plugin, you can manually import the UI:

// app/_app.tsx or your application entry point
import { useEffect } from 'react';

export default function App({ Component, pageProps }) {
  useEffect(() => {
    if (process.env.NODE_ENV === 'development') {
      import('xray-react/lib/xray-react-ui');
      import('xray-react/lib/xray-react-client'); // Optional: for file opening functionality
    }
  }, []);

  return <Component {...pageProps} />;
}

Note: When using manual import, the Socket.IO server won't be started automatically. You'll need to run the standalone server separately (see Standalone Server below).

Standalone Server

For manual imports or local development, you can run the xray-react server separately:

# From your React project root
cd /path/to/your/react-project

# Option 1: Set project root via environment variable
XRAY_REACT_PROJECT_ROOT=$(pwd) node node_modules/xray-react/server.js

# Option 2: Run from project root (auto-detects via package.json)
node node_modules/xray-react/server.js

# Option 3: If using npm link for local development
XRAY_REACT_PROJECT_ROOT=$(pwd) npm run server --prefix /path/to/xray-react

The server will:

  • Auto-detect your project root (via package.json or XRAY_REACT_PROJECT_ROOT env var)
  • Scan your source files to build component mappings
  • Start Socket.IO server for file opening
  • Send project configuration to connected clients

Note: The client bundle dynamically loads Socket.IO from a CDN, so an internet connection is required for file opening functionality.

Configuration

Environment Variables…

Description from the npm listing.

  • component-inspector
  • css
  • debug
  • debugging
  • development
  • development-tool
  • devtools
  • inspector
  • layout
  • nextjs
  • react
  • react-component
  • react-inspector
  • reactjs
  • style
  • typescript
  • ui
  • vite
  • vite-plugin
  • webpack

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

xray-react weekly downloads on npm, last 90 days: 47 weekly downloads as of Dec 5, 2026, +80.8% over 90 days.xray-reactWeekly downloads on npm · Last 90 days47downloads / week+80.8% over 90 days010203040506070Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
xray-react weekly downloads on npm, last 90 days: 47 weekly downloads as of Dec 5, 2026, +80.8% over 90 days.

7/30/90-day growth

xray-react weekly downloads growth on npm: 0.0% over 7 days, -20.3% over 30 days, +80.8% over 90 days.xray-reactWeekly downloads growth on npm47downloads / week now7-day growth+0 weekly downloads0.0%30-day growth-12 weekly downloads-20.3%90-day growth+21 weekly downloads+80.8%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
xray-react weekly downloads growth on npm: 0.0% over 7 days, -20.3% over 30 days, +80.8% over 90 days.

Ranking history

xray-react npm ranking history: currently #2786 (by weekly downloads).xray-reactnpm ranking · by weekly downloads · Last 90 days#2786current rank#1800#2000#2200#2400#2600#2800Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
xray-react npm ranking history: currently #2786 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 140, #6 (overall #2,786)
All npm: every listing in weekly downloads order

Listing placement

Webpack plugins349 listings · 18 pages · page 12, #19 (overall #239)
Webpack plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for xray-react
Date (UTC)Weekly downloadsChange vs. previous
47-10
57+1
56+25
31-3
34-4
38+1
37-10
47+7
40+2
38-7
45-1
460
46-8
54—

Similar npm Webpack plugins plugins

All 20 xray-react alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/xray-react. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.