Pro (paid add-on)
Gantt
ProGantt is a project timeline with task groups, progress, dependencies and milestones, and bars you can move and resize with the mouse or the keyboard.
Part of Pro
This page documents part of @vjdesigns-pro/ui, the paid add-on package. Using it needs a Pro license and @vjdesigns/vjdesigns-ui 3.8.0 or later. Like the free package, it works in both modes, every brand, all 32 languages and right to left. Install it as described in Account forms.
Example
A project timeline: a season plan, a facilities project, a recruiting calendar. Tasks are plain data: start and end dates (inclusive), an optional progress (0 to 100), a parent to group tasks, dependencies (ids that must finish first), milestone and a color.
import { Gantt, type GanttTask } from "@vjdesigns-pro/ui";
const [tasks, setTasks] = useState<GanttTask[]>([
{ id: "pre", title: "Preseason", start: "2026-10-26", end: "2026-11-13" },
{ id: "try", parent: "pre", title: "Tryouts", start: "2026-10-26", end: "2026-10-30", progress: 100 },
{ id: "roster", parent: "pre", title: "Roster announced", start: "2026-11-02", end: "2026-11-02",
milestone: true, dependencies: ["try"] },
]);
<Gantt
aria-label="Season plan"
tasks={tasks}
onTaskSelect={openTask}
onTaskChange={(task, dates) =>
setTasks((list) => list.map((t) => (t.id === task.id ? { ...t, ...dates } : t)))
}
/>;
Timeline and tasks
- Groups span their tasks and average their progress; they collapse and expand.
- Timeline: a day, week or month
scale, a line for today with a button that scrolls to it, and arrows for dependencies. An arrow is dashed when a task starts before what it depends on has finished. The task list stays in view while the timeline scrolls. - Rescheduling: with
onTaskChange, drag a bar to move it or either end to change its dates. From the keyboard, Alt with Left or Right moves a task a day, and Alt+Shift with Left or Right changes its end. Changes are announced.
Keyboard and languages
The chart is a treegrid and one Tab stop. Up and Down move between tasks, Left and Right collapse and expand groups, and Enter opens a task. Each row reads its title, dates, length, progress and dependencies. Dates and the first day of the week follow the locale, and the timeline runs right to left in right-to-left languages.
Props
Gantt
A project timeline: tasks as bars across days, weeks, or months, grouped under collapsible summary rows, with dependency arrows and a line for today. With onTaskChange, bars move by dragging and resize from either end, or from the keyboard.
Accessibility: a treegrid of tasks, one Tab stop. Up / Down move between tasks, Left / Right collapse and expand groups (or go to a task's group), Enter opens a task, Alt with Left / Right moves it a day, and Alt+Shift with Left / Right changes its end. Each row reads its title, dates, length, progress, and dependencies; changes are announced.
<Gantt
aria-label="Season plan"
tasks={tasks}
onTaskChange={(task, dates) => save({ ...task, ...dates })}
/>
| Prop | Type | Default |
|---|---|---|
aria-labelRequiredAccessible name of the chart (e.g. "Season plan"). | string | — |
tasksRequiredThe tasks, in display order. Subtasks follow their group's order. | readonly GanttTask[] | — |
scaleThe time scale (controlled). | "day""week""month" | — |
defaultScaleInitial scale when uncontrolled. | "day""week""month" | "day" |
onScaleChangeCalled when the user switches scales. | (scale: GanttScale) => void | — |
collapsedIds of collapsed groups (controlled). | string[] | — |
defaultCollapsedInitially collapsed groups when uncontrolled. | string[] | [] |
onCollapsedChangeCalled when a group is collapsed or expanded. | (collapsed: string[]) => void | — |
onTaskChangeTurns on moving and resizing (drag, or Alt with the arrow keys). Called with the new dates; update | (task: GanttTask, dates: GanttTaskDates) => void | — |
onTaskSelectCalled when a task is clicked or opened with Enter. | (task: GanttTask) => void | — |
startDateFirst day shown. | ISODate | a week before the earliest task |
endDateLast day shown. | ISODate | three weeks after the latest task |
weekStartsOnFirst day of the week, 0 (Sunday) to 6. | number | the locale's |
heightHeight of the scrolling area (CSS length). | CSSProperties["maxHeight"] | "32rem" |
classNameClass name for the root. | string | — |
styleStyle for the root. | CSSProperties | — |
GanttTask
One task (or group of tasks) on the chart.
| Prop | Type | Default |
|---|---|---|
idRequiredUnique id. | string | — |
titleRequiredName shown in the task list and read with the task. | string | — |
startRequiredFirst day, "YYYY-MM-DD". A task with subtasks spans them instead. | ISODate | — |
endRequiredLast day, "YYYY-MM-DD" (inclusive). A milestone's is its | ISODate | — |
progressPercent done, 0 to 100. Groups average their subtasks by length. | number | — |
parentThe | string | — |
dependenciesIds of tasks that must finish first. Drawn as arrows. | readonly string[] | — |
milestoneA single moment rather than a span: drawn as a diamond. | boolean | — |
colorPalette slot 1 to 8 for the bar (a team, a phase). | number | 1 |
editableAllow moving and resizing (when the chart has | boolean | true |
GanttTaskDates
New dates for a task.
| Prop | Type | Default |
|---|---|---|
startRequired | ISODate | — |
endRequired | ISODate | — |