Skip to content

Gantt Timeline

Work items as bars on a day grid, grouped in phases, with today, weekends and the dependencies between them. Drag a bar or its ends, or use the arrow keys; a link a move breaks turns red. A proposal shows the old dates beside the new ones and changes nothing on its own.

On this page
Used for
  • Project and launch plans
  • Work split between people and agents
  • Rescheduling a late item
  • Phases with milestones
  • Reviewing a plan an agent proposes

Examples

On a phone

Installation

Installation is part of Pro

Pro components install from a licensed registry. The live preview stays open to everyone.

Props

items
GanttItem[]
id, title, start and end (ISO days, end included), and optionally group, status, owner, progress, deps (ids it waits on), milestone, note and icon (a glyph or an emoji string, drawn in a neutral 24px tile). Controlled: put a changed item back in to keep it.
range / today
{ start, end } / string
The days shown, and today (the pill, the line, and what counts as late).
groups
GanttGroup[]
Phases, in order, each with an optional icon or emoji. Each gets a row with a span line, a count and "2 of 6 done", and folds.
onItemChange
(next, edit) => void
A drag, a resize or a key changed an item. edit says move or resize, the edge, the days and via pointer or keyboard.
selected / onSelect
string | null / (id) => void
The selected bar gets the ink ring and resize grips.
expanded
{ id, list?, content }
A row under that item; the rows below move down. Details, subtasks, a proposal.
proposal
GanttChange[]
Proposed dates: ghosts at the old ones, rings and chips at the new ones. Make them with knockOn(items, id, next, { mode }).
onOpen / onEscape / onLinkCreate
callbacks
Enter on a bar, Esc with nothing to cancel, and D on one bar then D or Enter on another.
dayWidth / minDayWidth
"fit" | number / number
Default"fit" / 14
Fill the width, or a set width that scrolls. From 26px the header shows every day.
listWidth / compact
number / boolean
Default332 / false
The list pane. compact puts the id over the title, for a phone.
readOnly
boolean
Defaultfalse
No drag, resize or keys that change dates.
weekend / scrollTo / locale
number[] / string / string
Default[6, 0] / - / en-US
Weekend days, the day to scroll to on mount, and the date format.
collapsed / onCollapsedChange
string[] / (ids) => void
Folded phases, controlled or not (defaultCollapsed).
Utils
gantt-timeline-utils.ts
toDay, barBox, snapDays, moveSpan, resizeSpan, depEdges, brokenDeps, knockOn, applyChanges, keyAction, lateDays, formatRange.

Accessibility

  • The board is a named region with a list of rows. Each bar is a button named with its id, title, dates, state, owner, a broken link and a proposed shift ("LRK-083 Information architecture, Jan 12 to Jan 19, 2 days over, Ines Duarte").
  • One bar is in the tab order at a time. Left and Right move it a day, Shift with them shortens or extends it, Up and Down go to the item above or below, Home and End to the first and last, Enter opens it, D starts a link and Esc cancels.
  • Every change is said in a polite live region ("LRK-084 Jan 19 to Jan 30").
  • State is never colour alone: late says "2d over", running says "Running · 62%", an unowned item says "Unassigned", and a broken link says which item it starts before.
  • Phases fold with a button that has aria-expanded.

What it handles

  1. 01Lays work items out on a day grid from a start to an end date, with months, week starts, hatched weekends and a today line, and fits the width or scrolls at a set day width.
  2. 02Colours bars by status only: planned neutral, in progress and running sky with a progress fill, waiting and late amber, done emerald. A late item adds a dashed overrun up to today and says how many days.
  3. 03Drags a bar to move it and its ends to resize it, snapped to whole days, with a ghost at the old dates, snap guides and the new dates in a chip; Esc cancels mid-drag.
  4. 04Draws finish-to-start dependencies as elbows and turns one red, with "Starts before LRK-083 ends", when a move breaks it.
  5. 05Opens a row under an item that pushes the rows below down, for details, subtasks or a proposal; the dependency lines follow.
  6. 06Shows a proposal without changing anything: the old dates as ghosts, the new ones with a ring and a +3d chip, and the chain drawn in ink.

States

First render
Bars sit at their dates; nothing animates in
none
Hover or focus
The ring darkens and the dates show in a chip
120ms opacity, ease out
Drag or resize
The bar follows by whole days; ghost and guides stay put
none, follows the pointer
Open a phase
The chevron turns
120ms, ease out
Reduced motion
Chips and chevron change at once
0ms

Works with

When to use

When to use

  • A project or launch plan on a day grid: phases, owners (people and agents), dependencies, today and what is late.
  • Rescheduling by drag or keys, and showing a plan someone else proposed before anyone approves it.

When not to use

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Gantt Timeline to my app and wire it to my own data.
  • I need a project or launch plan on a day grid: phases, owners (people and agents), dependencies, today and what is late. Set that up with the Knowns UI Gantt Timeline.
  • Which Gantt Timeline props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "gantt-timeline" }) and search_docs({ query: "gantt timeline" }). Pro props, full examples and source come back once your license key is in the MCP config.

Need help?

Stuck on Gantt Timeline, or found something off? We read every message.