New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-topography

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-topography

A tool to generate a topography of React component relationships

latest
Source
npmnpm
Version
0.0.5
Version published
Maintainers
1
Created
Source

React Topography

A CLI tool to generate a topography of React component relationships.

Description

React Topography is a command-line tool that visualizes the component hierarchy and relationships in React applications. It generates an interactive static site displaying a flow from the root of the app to its components, allowing you to explore their connections.

Topography Sample

Installation

pnpm install -g react-topography

Usage

Run the CLI from your project’s root directory, specifying the source directory where your React code resides (e.g., where main.tsx or app.tsx is located) using the -s flag.

Command

react-topography -s <source-directory>

Examples

  • If your React code is in the src directory:

    react-topography -s ./src
    
  • If your React code is in packages/demo/src:

    react-topography -s ./packages/demo/src
    

After running the command, the tool spins up a static site at http://localhost:4001/. The site displays an interactive visualization of your React app’s component relationships, where you can:

  • Drag nodes to reposition them
  • Zoom in and out
  • Move around the topography

Supported Environments

React Topography currently supports React applications created with:

  • Create React App
  • Vite

Note: Support for Next.js or Remix React apps is not yet available.

Limitations

  • The tool may have bugs, and some components might not be recognized.
  • It may not work well for default exports that are imported with a different name than the export name.

Contributing

Feel free to report issues or contribute to the project on GitHub. We welcome feedback and improvements!

License

MIT

Keywords

react

FAQs

Package last updated on 14 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts