Gantt Chart

A React Gantt chart for project timelines with day and week scales, a today line, progress fills in the bars, dependency arrows, a fixed task column and focusable bars.

src/registry/ui/gantt-chart.tsx/r/gantt-chart.json

Installation#

bash
npx shadcn@latest add @minidev/gantt-chart

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/gantt-chart.json

Usage#

tsx
import { GanttChart } from "@/components/ui/gantt-chart"

export function Example() {
  return <GanttChart />
}

API reference#

GanttChart props
PropTypeDefault
tasksGanttTask[]-
scaleGanttScale-
defaultScaleGanttScale"day"
onScaleChange(scale: GanttScale) => void-
todayDate | string-
padDaysnumber2
titlestring"Launch plan"
nameWidthnumber176
onTaskClick(task: GanttTask) => void-
classNamestring-

Dependencies#

npm

React only
All chart components

Learn more