npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-gantt.json --yesGantt
ProA timeline of dated bars for a roadmap, a schedule or a release plan, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
- GanttScaleThe scale header, the gantt's first child
- GanttGroupA group of rows under a header that folds them (a team, a quarter, a milestone)
- GanttRowOne row
- GanttBarOne bar on its row's track, from
fromtoto(both days included), as the gantt's own range - GanttToolbarThe gantt's toolbar, its first child
- GanttLegendThe gantt's legend, its last child
import { Gantt, GanttScale, GanttGroup, GanttRow, GanttBar, GanttToolbar, GanttLegend } from '@/components/goop/patterns/gantt';
import { useState } from 'react';
import { SegmentedControl, SegmentedControlItem } from '@/components/ui/goop/segmented-control';
function Roadmap() {
const PROJECTS = [
{ id: 'search', name: 'Search speed-up', start: '2026-10-05', end: '2026-12-11', hue: 'blue', health: 'on-track', progress: 60 },
{ id: 'push', name: 'Push settings', start: '2026-11-16', end: '2026-11-27', hue: 'red', health: 'off-track', progress: 20 },
] as const;
const [zoom, setZoom] = useState<'week' | 'month' | 'quarter'>('month');
return (
<Gantt aria-label="Roadmap" zoom={zoom} from="2026-09-01" to="2027-03-31" todayLabel="Today">
<GanttToolbar>
<SegmentedControl aria-label="Zoom" fit value={zoom} onValueChange={(value) => setZoom(value as typeof zoom)}>
<SegmentedControlItem value="week">Weeks</SegmentedControlItem>
<SegmentedControlItem value="month">Months</SegmentedControlItem>
<SegmentedControlItem value="quarter">Quarters</SegmentedControlItem>
</SegmentedControl>
</GanttToolbar>
<GanttScale />
<GanttGroup label="Platform">
{PROJECTS.map((one) => (
<GanttRow key={one.id} label={one.name}>
<GanttBar
from={one.start}
to={one.end}
label={one.name}
hue={one.hue}
health={one.health}
progress={one.progress}
href={`/projects/${one.id}`}
/>
</GanttRow>
))}
</GanttGroup>
<GanttLegend labels={{ blue: 'Active', red: 'Blocked' }} />
</Gantt>
);
}Switch the roadmap between weeks, months and quarters, scroll away and press Today to come back, fold a team (the line under it says which), and press a project’s bar to open it and mark it done (its fill turns full). The arrow keys move between bars; hover a bar for its dates and progress. The projects are our own sample, placed around today; nothing is saved anywhere.
When to use
- A timeline of dated bars for a roadmap, a schedule or a release plan.
- Also called: gantt chart or roadmap timeline.
Installation
Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Gantt on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-gantt.json --yesAdd the Goop Gantt to this project. The install steps are at https://goop.so/docs/install.mdUsage
import { Gantt, GanttScale, GanttGroup, GanttRow, GanttBar, GanttToolbar, GanttLegend } from '@/components/goop/patterns/gantt';
import { useState } from 'react';
import { SegmentedControl, SegmentedControlItem } from '@/components/ui/goop/segmented-control';
function Roadmap() {
const PROJECTS = [
{ id: 'search', name: 'Search speed-up', start: '2026-10-05', end: '2026-12-11', hue: 'blue', health: 'on-track', progress: 60 },
{ id: 'push', name: 'Push settings', start: '2026-11-16', end: '2026-11-27', hue: 'red', health: 'off-track', progress: 20 },
] as const;
const [zoom, setZoom] = useState<'week' | 'month' | 'quarter'>('month');
return (
<Gantt aria-label="Roadmap" zoom={zoom} from="2026-09-01" to="2027-03-31" todayLabel="Today">
<GanttToolbar>
<SegmentedControl aria-label="Zoom" fit value={zoom} onValueChange={(value) => setZoom(value as typeof zoom)}>
<SegmentedControlItem value="week">Weeks</SegmentedControlItem>
<SegmentedControlItem value="month">Months</SegmentedControlItem>
<SegmentedControlItem value="quarter">Quarters</SegmentedControlItem>
</SegmentedControl>
</GanttToolbar>
<GanttScale />
<GanttGroup label="Platform">
{PROJECTS.map((one) => (
<GanttRow key={one.id} label={one.name}>
<GanttBar
from={one.start}
to={one.end}
label={one.name}
hue={one.hue}
health={one.health}
progress={one.progress}
href={`/projects/${one.id}`}
/>
</GanttRow>
))}
</GanttGroup>
<GanttLegend labels={{ blue: 'Active', red: 'Blocked' }} />
</Gantt>
);
}- Fits: list (its recipe); list: collection (time: span).
- Also known as: Roadmap, RoadmapTimeline, GanttChart, TimelineChart, ProjectTimeline.
- Start it with
GanttScale, thenGanttRows holdingGanttBars, orGanttGroups of rows; never bars on a grid by hand. It fills its container and scrolls sideways in its own frame. The zoom switch is yours (aSegmentedControlholdingzoom), in aGanttToolbarbefore the scale, which adds the Today button; aGanttLegendafter the rows names the hues. A bar is a button: itsonClickopens the record (RecordPeek); withhref(orasChildand a router's link) it is a link to the record's page. Itsprogressfills its done share;markersdraw dated lines. - height, width, padding, gap, corner, border, background, text, motion: add no class for these.
API reference
- Each option with its sentence: gantt--options.md
| Part | What it is |
|---|---|
| GanttScale | The scale header, the gantt's first child; its props: gantt--scale.md |
| GanttGroup | A group of rows under a header that folds them (a team, a quarter, a milestone); its props: gantt--group.md |
| GanttRow | One row; its props: gantt--row.md |
| GanttBar | One bar on its row's track, from from to to (both days included), as the gantt's own range; its props: gantt--bar.md |
| GanttToolbar | The gantt's toolbar, its first child; its props: gantt--toolbar.md |
| GanttLegend | The gantt's legend, its last child; its props: gantt--legend.md |
GanttBar
One bar on its row's track, from from to to (both days included), as the gantt's own range.
import { GanttBar } from '@/components/goop/patterns/gantt';Options
- from: GanttDate — Its first day, a date (
YYYY-MM-DDor aDate). - to: GanttDate — Its last day (included), a date (
YYYY-MM-DDor aDate). - label: string — Its words (a project's name).
- hue?: Exclude<Hue, 'orange' | 'pink'> = 'neutral' — Its colour, a hue that says nothing by itself (a team's, a status's):
blue,green,yellow,red, the accentprimary, or the greyneutralwhen left out; theGanttLegendsays what each means. - health?: 'on-track' | 'at-risk' | 'off-track' — Its health: a mark before the label, and words in its name.
- healthLabel?: string — The health in your words;
On track,At riskorOff trackwhen left out. - lead?: GanttLead — Who leads it: their avatar at the bar's end.
- progress?: number — How much of it is done, from 0 to 100: the done share keeps its tint, and
40% doneis in its name. - href?: string — The bar's link (the record's page): the bar is an
<a>, Enter opens it. - children?: ReactElement — With
asChild, the caller's link element (with no children of its own). - Also takes: asChild?: boolean; onClick?: (event: MouseEvent) => void; disabled?: boolean
- Types: GanttDate = string | Date; GanttLead = { name: string; initials?: string }
GanttGroup
A group of rows under a header that folds them (a team, a quarter, a milestone).
import { GanttGroup } from '@/components/goop/patterns/gantt';Options
- label: string — The group's name (
Platform). - count?: number — A number after the name (its rows, its open items); read with the name.
- open?: boolean — Shown or folded, held by the caller; with
onOpenChange. - defaultOpen?: boolean = true — Shown or folded at first, when the caller does not hold it: shown.
- onOpenChange?: (open: boolean) => void — Called with the new state when the header is pressed.
GanttLegend
The gantt's legend, its last child.
import { GanttLegend } from '@/components/goop/patterns/gantt';Options
- labels?: Partial<Record<Exclude<Hue, 'orange' | 'pink'>, ReactNode>> — Your words for each hue (what blue means here); one left out is named by its colour.
Gantt: every option
import { Gantt } from '@/components/goop/patterns/gantt';Options
- aria-label: string — The gantt's name (
Roadmap). - from: GanttDate — The first day the grid must show; the grid starts at the column holding it.
- to: GanttDate — The last day the grid must show.
- zoom?: 'week' | 'month' | 'quarter' = 'month' — What a column holds:
weeks under months,months under quarters,quarters under years. - today?: GanttDate | null — The day the today line marks; the current day when left out, none with
null. - locale?: string — The language of the scale and the tooltips' dates (a BCP 47 tag; the page's, else the browser's, when left out).
- todayLabel?: string — Words at the today line's head in the scale (
Today), and the line's name and the Today button's words; no words drawn when left out (the line and the button then sayToday). - markers?: readonly GanttMarker[] — Dated dashed lines across the grid (a release, a milestone), their words at their head.
- empty?: ReactNode = 'Nothing on the timeline yet' — The words shown when the gantt holds no rows.
- scrollToToday?: boolean = true — On first showing, scroll the today line into view.
- tooltipContainer?: HTMLElement | null — Where the bars' tooltips are portalled; the end of
<body>when left out. - Types: GanttDate = string | Date; GanttMarker = { date: GanttDate; label: string }
GanttRow
One row.
import { GanttRow } from '@/components/goop/patterns/gantt';Options
- label: ReactNode — The row's name (a project's).
- description?: ReactNode — A second line under it (its team, its target, its count of issues).
GanttScale
The scale header, the gantt's first child.
import { GanttScale } from '@/components/goop/patterns/gantt';Options
- heading?: ReactNode — The words over the label column (
Project).
GanttToolbar
The gantt's toolbar, its first child.
import { GanttToolbar } from '@/components/goop/patterns/gantt';Options
- todayButton?: boolean = true — Draw the Today button at the band's end.
- todayLabel?: string — The Today button's words: the gantt's
todayLabel, elseToday.
Keyboard
| Key | What it does |
|---|---|
| Tab | Move to the next group header or bar, group by group, row by row |
| ArrowLeft ArrowRight | Move to the bar before or after in the same row |
| ArrowUp ArrowDown | Move to the nearest bar of the row above or below |
| Home End | Move to the row's first or last bar |
| Enter Space | Open the bar, or fold or show a group |
Accessibility
- The native element answers the keyboard.
- hover, focus-visible: the browser's own (:hover, :focus-visible): write nothing
Motion
- The part sets its own motion: add no transition or animation of your own.
- How the theme moves, and how to move your own parts the same way: Motion.
Notes for AI
Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.