---
title: "Gantt Timeline Chart | Free React & Tailwind Blocks Component | Motion UI"
canonical: "https://blacknest.dev/motion/c/blocks/gantt"
github_source: "https://github.com/Rkj0123/motion-ui-skill/blob/main/components/motion/gantt.tsx"
install_command: "npx motion-ui-skill add gantt"
dependencies: ["clsx","lucide-react","motion","react","tailwind-merge"]
category: "blocks"
subcategory: "motion"
---

# Gantt Chart

> Interactive Gantt task schedule timeline with milestone diamonds, progress fill overlays, split panes, and hover interactions. Inspired by KeenThemes ReUI.

## Install

```bash
npx motion-ui-skill add gantt
```

## Dependencies

- `clsx`
- `lucide-react`
- `motion`
- `react`
- `tailwind-merge`

## Usage

```tsx
"use client";

import { Gantt, type GanttTask } from "@/components/motion/gantt";

const TASKS: GanttTask[] = [
  { id: "1", name: "System Architecture & Specs", startDay: 1, duration: 4, progress: 100 },
  { id: "2", name: "Motion Tokens Integration", startDay: 4, duration: 6, progress: 75 },
  { id: "3", name: "Security Audit Alpha", startDay: 10, duration: 1, isMilestone: true },
  { id: "4", name: "Production Rollout", startDay: 11, duration: 8, progress: 20 },
];

export function GanttExample() {
  return (
    <div className="max-w-4xl p-6">
      <Gantt tasks={TASKS} totalDays={20} onTaskClick={(t) => console.log("Task:", t.name)} />
    </div>
  );
}
```

## Props

| Prop | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `tasks` | `GanttTask[]` | required | Array of tasks with start day, duration, progress, and milestone flag. |
| `totalDays` | `number` | `20` | Total horizontal day column span. |
| `onTaskClick` | `(task: GanttTask) => void` | `undefined` | Callback emitted when a task row is clicked. |
| `className` | `string` | `undefined` | Custom styling overrides merged via `cn()`. |

## Source Files

- [components/motion/gantt.tsx](https://github.com/Rkj0123/motion-ui-skill/blob/main/components/motion/gantt.tsx)
- [lib/ease.ts](https://github.com/Rkj0123/motion-ui-skill/blob/main/lib/ease.ts)
- [lib/hooks/use-haptic.ts](https://github.com/Rkj0123/motion-ui-skill/blob/main/lib/hooks/use-haptic.ts)
- [lib/utils.ts](https://github.com/Rkj0123/motion-ui-skill/blob/main/lib/utils.ts)
