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

react-custom-gantt

v1.3.0

Published

A professional, high-performance, and fully customizable Gantt chart component for React.

Readme

React Custom Gantt

A professional, high-performance, and fully customizable Gantt chart component for React.

Features

  • TypeScript Support: Fully typed for a better developer experience.
  • Auto-scheduling: Support for task dependencies and date cascading.
  • Customizable Columns: Easily define your own columns and templates.
  • Standard Connector Types: Support for E2S (FS), S2S (SS), E2E (FF), and S2E (SF) links with validation.
  • Interactive: Drag-and-drop to move and resize tasks, and create dependencies visually.
  • Built-in Themes: Professional Light and Dark mode support out of the box.
  • Milestone Markers: Vertical anchor lines for key project milestones.
  • Styling: Modern, premium design with built-in CSS injection.

Installation

npm install react-custom-gantt

Usage

import { GanttChart, Task, Link } from 'react-custom-gantt';

const tasks: Task[] = [
  { id: 1, text: 'Task 1', start: new Date(), duration: 5, type: 'task', progress: 50 }
];

const links: Link[] = [
  { id: 1, source: 1, target: 2, type: 'e2s' }
];

function App() {
  return (
    <GanttChart 
      tasks={tasks}
      links={links}
      onTaskUpdate={(id, updates) => console.log('Update', id, updates)}
      onTaskDelete={(id) => console.log('Delete', id)}
      onLinkCreate={(link) => console.log('New Link', link)}
      onLinkDelete={(id) => console.log('Delete Link', id)}
    />
  );
}

Peer Dependencies

Ensure you have the following installed:

  • react >= 18.0.0
  • react-dom >= 18.0.0
  • moment >= 2.0.0

Advanced Customization

Theming

You can easily customize the colors using the theme prop:

<GanttChart
  theme={{
    primary: '#10b981',
    background: '#ffffff',
    sidebarBackground: '#f3f4f6',
    border: '#e5e7eb',
    text: '#1f2937'
  }}
  // ... other props
/>

Custom Renderers

Take full control over the task bars and tooltips:

<GanttChart
  renderTaskContent={(task) => (
    <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
      <span>🔥</span>
      <span>{task.text}</span>
    </div>
  )}
  renderTooltip={(task) => (
    <div className="custom-tooltip">
      <h4>{task.text}</h4>
      <p>Custom Progress: {task.progress}%</p>
    </div>
  )}
  // ... other props
/>

Event Hooks

Listen to various user interactions:

<GanttChart
  onTaskClick={(task) => console.log('Clicked', task)}
  onTaskDoubleClick={(task) => alert(`Editing ${task.text}`)}
  rowHeight={56}
  headerHeight={100}
  // ... other props
/>

Individual Task Styling

You can even style tasks individually via the task object:

const tasks = [
  {
    id: 1,
    text: 'Priority Task',
    start: new Date(),
    duration: 5,
    styles: {
      backgroundColor: '#ef4444',
      progressColor: '#b91c1c'
    }
  }
];

Development

To run the demo app locally:

npm install
npm run dev

To build the library:

npm run build