Gantt chart

A React component in Beamline's Charts & data-vis category.

A plan as bars on a timeline: tasks grouped down the side, each bar from its start to its end with its progress, milestones as diamonds, arrows from each task to the ones waiting on it (red, with the reason, when a task starts before what it waits on ends), a line at today and a day, week or month scale; drag a bar or its end, or grab it with Space and walk it with the arrows.

Use it for

  • Work planned over weeks or months where order matters: a launch plan, a migration, a release train, a hiring plan.
  • Seeing what waits on what, what is late against today, and moving dates by hand.

Not for

Anatomy

  • toolbar: the range shown, the scale switch (Day · Week · Month), Today
  • side list: groups that fold, task names with assignee, a grip for keyboard focus
  • header: months above days or weeks
  • lanes: one per task, weekends shaded at day scale
  • bar: colour by group, progress filled from the start, name inside when it fits (beside it when not), end handle
  • milestone: a diamond with its name
  • dependency arrow from a task's end to the start of a task waiting on it
  • today line; a status line when a move is refused or breaks a dependency

Variants

  • 0: scale: day · week · month (column widths 32 / 18 per day / 5 per day)
  • 1: readOnly
  • 2: groups folded

States

  • loading
  • empty
  • dragging or resizing (the dates show on the bar while held)
  • grabbed by keyboard
  • dependency broken (arrow red, a glyph and the reason on the waiting task)
  • late (its end is before today and it is not done: a mark and the word Late)
  • done (progress 1: a check)
  • progress not tracked (null: hatched)
  • refused (canChange gave a reason)

Keyboard

  • Tab reaches the tasks as one list: ↑ ↓ move between tasks, ← → on a group folds or opens it
  • Space grabs a task: ← → move it a day (a week at week and month scale), Shift+← → change its end, Space or Enter drops, Escape puts it back
  • Enter opens a task (onTaskOpen)
  • T scrolls to today

Motion

Changing the scale keeps the date under the middle of the view in place while the columns ease to their new widths. A bar moved by keyboard or by someone else glides to its new dates; the arrows follow it. A dragged bar follows the pointer at once and settles on its day. Groups fold with a height ease. Reduced motion places everything at once; nothing runs at rest.

Props

PropTypeDefaultDescription
tasks / defaultTasks / onTasksChangeGanttTask[] / (tasks, change) => void—{ id, label, start: Date, end: Date, progress?: number | null, group?, dependsOn?: string[], milestone?, assignee?, readOnly? }; change is { task, start, end, kind: move · resize }.
groups{ id, label, color? }[]—Groups in order; a task's group picks its colour and place.
scale / defaultScale / onScaleChange"day" | "week" | "month"—Default week.
todayDate—The present for the today line and Late; the browser's clock by default.
canChange(task, next: { start, end }) => true | string—Return a reason to refuse a move or resize.
onTaskOpen(task) => void—Click or Enter on a task.
readOnlyboolean—Nothing moves.
heightnumber | "fill"—Default 420.
localestring—Formats dates.
loadingboolean—Skeleton bars.
emptyLabelstring—Default "Nothing planned yet".
aria-label (required)string—The plan's name: "Q4 launch plan".
className / classNames / style / refstring / GanttChartClassNames / CSSProperties / Ref<HTMLDivElement>—The root and its parts (toolbar, side, header, lane, bar, milestone, arrow, today).

Dependencies

lucide-react

Import

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

Get it

Gantt chart is part of Beamline: 200+ components and 50+ complete screens for React that your coding agent (Claude Code, Codex, Cursor or any MCP client) installs into your app through Beamline's MCP server, as a ready-built package or as plain React source you can change. $49 launch price, one payment, no subscription, lifetime updates, one licence for your whole team. Get Beamline · Connect your agent

More in Charts & data-vis

  • Sankey chart: Flows between stages as bands whose width is the amount: sources to pages to outcomes, budgets to teams; hovering or focusing a node lights its flows and…
  • Geo map: Values by country as a choropleth on the system's own world outline (no map service): classes from a sequential or diverging ramp with a legend you can…
  • Streamgraph: Stacked flows over time around a centre baseline, with silhouette, wiggle, expand (shares) and zero offsets: a legend that turns layers on and off, a…
  • Ridgeline: Distributions per group as overlapping density ridges (response time by region, order size by plan): an overlap control, median and p95 readouts per row…
  • Treemap: Nested rectangles sized by value (spend by team, then service), squarified so tiles stay close to square: labels that fit or hide, hover and focus…
  • Activity heatmap: A calendar of daily counts, one cell per day on a sequential ramp: weeks across, weekdays down, month and weekday labels, a legend scale, hatched days…
  • Gauge: One value against a known range: a semicircle, a 270° dial or a full ring, filled or with a needle, coloured bands with their names (healthy, busy…
  • Radial chart: Progress of a few measures toward their targets as concentric rings, full or half circle, with a centre readout and a list of each ring's value, target…
  • Radar chart: A few series compared across the same five to eight dimensions as polygons on a polygon or circle grid; hover or arrow keys pick a dimension and read…
  • Scatter chart: Two measures of many items against each other, one point per item, or a bubble chart when a third measure sizes the points: groups by colour and shape…
  • Area chart: Amounts over time as filled areas: overlapping, stacked or as shares of 100%, five fills, two strokes, five curves, a range handle; gaps for missing…
  • Composed chart: Different measures on one time axis: bars, lines and areas per series, a left and a right value axis with their own formats, and reference lines.
  • Funnel chart: People or deals moving through ordered steps, each step a bar narrowing from the first: the part lost between two steps stays beside the next as a fading…
  • Waffle chart: Units of a whole as a grid of cells by category (seats used of a plan, tickets by channel): a 10×10 grid by default, hatched cells for units whose…
  • Slope chart: Change between two points in time per item, by value or by rank: labels on both sides that never collide, rising and falling told by the end marker (▲ ▼)…
  • Line chart: Values over time as lines: curves, point markers, dashed series for forecasts, reference lines for limits and targets, an optional zero baseline and a…
  • Bar chart: Amounts by category as bars: columns or rows, grouped, stacked or as shares, reference lines, five looks (rounded, cells, trace, isometric, monospace), a…
  • Pie chart: A few shares of a whole as a pie or donut, with spaced slices, percent labels, a centre readout and a list of every slice with value and share; hovering…
  • Sparkline: A compact trend beside its value: point along it or focus it and use ← → to read each point; nulls are gaps. TrendLine is the bare line.