Gantt
A project schedule with dependencies that push each other when you drag.
PROGet Gantt and 168 other Pro components with pro lifetime — Get Pro
- Category
- Productivity
- Access
- ProPro · unlocked
- Source
- 551 lines · one file
- States
- 8 drawn
- Added
- 2 Nov 2026
The decision inside it
Dragging a task pushes what depends on it
Move a task late and every task that depends on it slides with it, live, with the new finish date shown before you let go. A move that would start a task before the one it waits on is refused with the reason, and the batch is saved together or not at all.
When to use it
Use Gantt for project schedules with dependencies: launches, roadmaps, implementation plans. For work in columns by status use Kanban Board.
Installation
How you get it
Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.
Use Liro's Gantt for this.
Install it: npx shadcn@latest add @liro/gantt
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/gantt.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.
Usage
import { Gantt, type GanttMove, type GanttTask } from "@/components/ui/gantt";
export function ProjectPlan({ tasks, api }: { tasks: GanttTask[]; api: { reschedule: (moved: GanttMove[]) => Promise<void> } }) {
return <Gantt title="Launch plan" tasks={tasks} onChange={api.reschedule} />;
}API reference
“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Type | Notes | ||
|---|---|---|---|
tasks | GanttTask[] | Yes | – |
onChange | (moved: GanttMove[]) => void | Promise<void> | No | Every task a drag moved, the dragged one first. May return a promise; if it rejects, they all go back. |
scale | GanttScale | No | – |
defaultScale | GanttScale | No | – |
onScaleChange | (scale: GanttScale) => void | No | – |
title | string | No | – |
now | Date | number | No | Fix "today", for screenshots and tests. |
look | Look | No | – |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLiro foundations, installed alongside it
liro-themeStates
All of them are drawn by the component. None is left for you to design.
- Plan
- Dragging
- Pushed tasks
- Refused move
- Saving
- Save failed
- Zoomed out
- Empty
Accessibility
- Keyboard reachable throughout, in visual order
- Focus trapped in overlays, Escape closes them
- Focus returns to whatever opened it
- Live regions announce what changed, not that something did
- Honours prefers-reduced-motion
Responsive behavior
- Sizes to its container, not the viewport
- Usable from 320px up
- Pointer-based interaction, so trackpad and touch both work
- No hover-only affordances