Open-source Gantt Chart with virtualization - React based
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Bring interactive project planning to your React app.
Drag tasks, connect dependencies, and organize projects into nested timelines. Working calendars and light and dark themes come built in.
Open source, MIT licensed, React 18 and 19, TypeScript types
Quick start | Playground | Documentation | 한국어 문서
style overrides, localized dates and custom detail panels.onTasksChange call with the
complete next array. Storage, validation and undo stay in your app.pnpm add @jaeungkim/gantt-chart
# npm install @jaeungkim/gantt-chart
# yarn add @jaeungkim/gantt-chart
react and react-dom (^18 or ^19) are peer dependencies, and there are no others: React is
the only module the built bundle imports. Gzipped, the ESM build is under 40 kB and the stylesheet
under 5 kB.
import { useState } from 'react';
import { ReactGanttChart, type Task } from '@jaeungkim/gantt-chart';
import '@jaeungkim/gantt-chart/style.css';
const initialTasks: Task[] = [
{
id: 'design',
name: 'Design',
startDate: '2026-03-02',
endDate: '2026-03-06',
parentId: null,
sequence: '1',
progress: 100,
},
{
id: 'build',
name: 'Build',
startDate: '2026-03-09',
endDate: '2026-03-20',
parentId: null,
sequence: '2',
progress: 40,
dependencies: [{ targetId: 'design', type: 'FS' }],
},
{
id: 'ship',
name: 'Ship',
startDate: '2026-03-23',
endDate: '2026-03-23',
parentId: null,
sequence: '3',
dependencies: [{ targetId: 'build', type: 'FS' }],
},
];
export default function ProjectChart() {
const [tasks, setTasks] = useState(initialTasks);
return (
<ReactGanttChart
tasks={tasks}
onTasksChange={setTasks}
height={420}
showTaskList
defaultScale="month"
/>
);
}
Your app holds the tasks array. Every committed gesture ends in one onTasksChange call with the
complete next array, and the chart persists nothing, including the scale.
Quick start goes from install to a chart your app
can edit. GanttProps lists every prop, callback and
default. The chart renders no toolbar, so your app renders the scale control and drives it
through the ref in Imperative API.
Release notes are on GitHub Releases.
Setup, the checks CI runs, and the branch and PR conventions are in CONTRIBUTING.md. Questions and ideas go in Discussions. Issues are for bugs and concrete feature requests.