Installation

GitGraph installs as a shadcn registry component. Run the command below in any Next.js or Vite project that already has shadcn initialised (i.e. a components.json with the standard aliases components, lib, utils).

npx shadcn@latest add https://seanrobertwright.github.io/GitGraph/r/git-graph.json

Files copied

The installer writes the following into your project:

Runtime dependency

The installer adds @tanstack/react-virtual to your dependencies (used for the windowed virtualization path). No other runtime peers beyond React 18+.

Importing the styles

Import the CSS once at the root of your app (e.g. in app/layout.tsx):

import "@/components/git-graph/git-graph.css";