Why React Teams Choose ApexGantt
The react-apexgantt wrapper exposes the chart as a real React component, <ApexGanttChart />, with props, events, refs, and hooks that match how React applications already work, not a thin shell around an imperative library that leaves you fighting refs and effect cleanup. It shares its core engine with ApexGantt's Angular, Vue, and JavaScript wrappers, so the task data and configuration API stay consistent if your stack grows beyond React. Learn about the full ApexGantt component →
Drag-and-Drop Scheduling, Driven by React State
Drag tasks to reschedule, resize bars to change durations, and draw dependency arrows, all on the timeline. Every committed edit fires a typed onTaskUpdateSuccess callback with the source of the change, and gestures add onTaskDragged and onTaskResized, so you persist to your backend or store from one place, then pass the updated tasks back as a prop. Watch the scripted plan move, then grab a bar yourself.
Critical Path That Recomputes on Every Edit
ApexGantt highlights the longest chain of dependent tasks that drives your finish date. Update a task through props or the ref API and the critical path recomputes automatically, so a slip becomes visible the moment your React state changes. Watch it re-route between the two branches below.
Baselines for Planned vs. Actual
Attach a planned (baseline) range to each task in the same tasks array and ApexGantt draws a thin reference bar beneath the live one, so schedule variance is visible at a glance. No separate data structure, just an extra field on the task you already pass as a prop. The demo drifts the actuals past plan to show a slipping project.
Continuous Zoom via a Single Prop
Control timeline density with the pixelsPerDay prop (a number; the header tier auto-picks from year down to minute), with no data re-query. This one auto-zooms; interact to take the controls.
Task Dependencies
Finish-to-start, start-to-start, finish-to-finish, and start-to-finish links with lag, set on the tasks you pass as a prop.
Milestones
Zero-duration diamond markers for gates, releases, and key dates.
Annotations
Pin sprint boundaries, deadlines, or notes to specific dates through the options prop.
Resizable Sidebar
A resizable task list that adapts to long task names or more timeline room.
Rich HTML Tooltips
Templatable tooltips showing dates, duration, progress, and dependencies.
Custom Colors & Dark Theme
Flip themes with the theme prop; deeper styling via the options object.
SVG, PNG and PDF Export
Export from the toolbar or with exportChart() on the instance. SVG stays vector with every task and dependency; PNG and PDF are images.
TypeScript Types
Definitions ship for the ApexGanttChart props, TaskInput, GanttUserOptions, and the ref handle.
Performance with Large React Gantt Timelines
ApexGantt renders large project timelines quickly. On an Apple M4 Pro (apexgantt 3.11.1, headless Chromium):
React Gantt Chart FAQ
How do I install ApexGantt for React?
Run npm install react-apexgantt apexgantt. Both packages are required: react-apexgantt is the React wrapper, and apexgantt is the core engine it depends on. Import ApexGanttChart from react-apexgantt and render it with a tasks array.
Does ApexGantt support TypeScript?
Yes. Type definitions ship with the package, covering the ApexGanttChart component props, the TaskInput data model, GanttUserOptions configuration, and the ApexGanttHandle ref interface. No separate @types/ install is required.
How do I handle task drag-and-drop in React state?
Persist from onTaskUpdateSuccess. With apexgantt 3.20 it fires once for every committed edit (drag, resize, progress drag, dialog, inline or keyboard edit, or an updateTask call) with the updated task and a source field naming the path, so one handler covers them all; pass { silent: true } to updateTask for a server echo you do not want reported. onTaskDragged and onTaskResized add the gesture detail, and saving from them as well saves a drag twice. Pass the new task array back as a prop and the chart reflects the change.
Does ApexGantt support critical path and baselines?
Yes. Critical path highlighting and baseline (planned-vs-actual) tracking are both built in. They use the same task data model and ship with worked demos.
How do I set the ApexGantt licence key in a React app?
Import setApexGanttLicense from react-apexgantt and call it once at application start, typically in main.tsx or index.tsx, before rendering any chart. ApexGantt is included in the Premium plan and above and has no free tier. Without a key it renders with a trial watermark for evaluation.
Can ApexGantt handle large React Gantt timelines?
Yes. In a benchmark on an Apple M4 Pro, ApexGantt rendered a 5,000-task timeline in about 275 ms and a 10,000-task timeline in about 620 ms (apexgantt 3.11.1).
Ready to build your React project timeline?
The fastest path is the demos: running examples you can read and copy from.
See ApexGantt Demos
