Skip to content

GhostGantt reference ​

Package: @ghostvue/vue. Status: experimental (stability policy).

Headless, date-only Gantt chart over an app-owned schedule: a named treegrid whose rows read a task's title, inclusive dates, and finish-to-start dependencies (including links to tasks that are not in the schedule), aligned with an aria-hidden timeline of bars, milestones, connectors, and a today marker. One Tab stop with row focus, hierarchy keys, controlled selection, and an Edit dates dialog that proposes one editRequest; the application accepts by supplying revised tasks or rejects through taskErrors. The chart never schedules.

Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.

All component references

Props ​

NameTypeDefaultRequiredDescription
defaultExpanded'all' | readonly string[]"all"NoInitial expanded parents when `expanded` is omitted.
dependenciesreadonly GanttDependency[]"[]"NoFinish-to-start links, rendered as supplied, including overlapping and dangling dependencies.
dirGanttDirection—NoTimeline and arrow direction. When omitted, read from the root's computed `direction` in the browser.
expandedreadonly string[]—NoControlled expanded parent IDs (`v-model:expanded`). Omit for uncontrolled.
localestring"en-US"No`Intl` locale for date text. Explicit so SSR and hydration format identically.
messagesPartial<GanttMessages>—NoOverrides for labels, descriptions, and announcements.
rangeGanttRange—YesInclusive visible dates. Required so server and client markup agree.
selectedreadonly string[]—NoControlled selection (`v-model:selected`). When omitted, rows have no selection state.
selectionModeGanttSelectionMode"single"NoUsed only when `selected` is bound.
taskErrorsreadonly GanttTaskError[]"[]"NoApp-controlled messages; the chart never adds or clears entries.
tasksreadonly GanttTask[]—YesApp-owned tasks. Sibling order is array order. Never sorted, filtered, cloned, or mutated.
todayCalendarDate—NoOptional today marker. Never computed with `new Date()`.

Emits ​

NamePayloadDescription
editRequestGanttEditRequestProposes a completed, changed edit once, after Save in the Edit dates dialog: the dialog has closed and focus is back on the row. Not emitted for unchanged dates, Cancel, Escape, or when the task is removed or becomes read-only. The intent is derived from the authoritative and proposed dates. Answer every request with revised tasks or a new taskErrors entry object.

Models ​

PropEventTypeDescription
expandedupdate:expandedreadonly string[]Expanded parent IDs. Emits the full next array on a key or pointer toggle; IDs that are not parents or not in tasks are kept.
selectedupdate:selectedreadonly string[]Selected task IDs. Emits the full next array on Space; the chart never prunes an ID because its row is hidden or absent.

Slots ​

NameDescription
barVisual label inside a bar. `aria-hidden`; must not contain focusable content.
emptyContent of the empty chart.
taskTitle cell content. Must render text; the row's name is read from it. Default: `task.title`.

Slot props: bar ​

NameTypeDescription
errorstring | undefinedMessage of this task's `taskErrors` entry, if any.
expandedboolean | undefinedExpansion of a parent row; `undefined` for a leaf.
levelnumber1-based hierarchy level.
previewGanttScheduledDates | undefinedPreview dates while this task is being edited by a gesture.
selectedboolean | undefinedSelection state; `undefined` when `selected` is not bound.
taskGanttTaskSlot prop `task`.

Slot props: empty ​

None declared.

Slot props: task ​

NameTypeDescription
errorstring | undefinedMessage of this task's `taskErrors` entry, if any.
expandedboolean | undefinedExpansion of a parent row; `undefined` for a leaf.
levelnumber1-based hierarchy level.
previewGanttScheduledDates | undefinedPreview dates while this task is being edited by a gesture.
selectedboolean | undefinedSelection state; `undefined` when `selected` is not bound.
taskGanttTaskSlot prop `task`.

Exposed members ​

NameTypeDescription
announce(message: string) => voidSends a polite message through the chart's status element.
focusTask(id: string) => booleanFocuses a visible row and makes it the Tab target. `false` if hidden or absent.

Parts and data attributes ​

AttributeValueDescription
data-partrootOuter element. Consumer class and style land here.
data-parttreegridThe named role="treegrid" element and the one scroll surface for the task list and timeline. Every other fallthrough attribute lands here.
data-partheaderThe column header row: Task, Dates, Dependencies, and the aria-hidden timeline header with month and day labels.
data-partrowA task row (role="row") and the roving focus target.
data-parttitleThe Task cell (role="rowheader") and its column header. Holds the task slot.
data-parttogglePointer-only, aria-hidden expand and collapse control in a parent row's Task cell.
data-partdatesThe Dates cell: dates text, the Edit dates button, and any error.
data-partedit-buttonNative Edit dates button (tabindex="-1") in an editable row's Dates cell. Keyboard users press Enter or F2 on the row.
data-partdependenciesThe Dependencies cell, which describes the row.
data-parttimelineThe aria-hidden timeline cell of the header and of each row. It has no per-day elements; draw the day grid as a background.
data-partbarA span's bar, positioned by --ghost-gantt-offset and --ghost-gantt-days. Holds the bar slot.
data-partmilestoneA milestone marker, positioned by --ghost-gantt-offset (the day column of its date).
data-partconnectorA finish-to-start connector between two visible, scheduled tasks, positioned by its from/to day and row custom properties.
data-parttodayThe today marker, positioned by --ghost-gantt-offset.
data-parterrorA visible taskErrors message, in the row's Dates cell and in the editor.
data-partemptyThe cell holding the empty slot when there are no tasks.
data-partstatusVisually hidden polite status element after the treegrid that carries every announcement.
data-parteditor-formThe form inside the Edit dates dialog.
data-partfieldOne date field in the editor, with its label, date picker, and field error.
data-partfield-errorA structural validation error on an editor field.
data-parteditor-noticeVisible editorRefreshed notice in the editor after an external date change.
data-partsaveThe editor's Save (submit) button.
data-partcancelThe editor's Cancel button.
data-kindspan, milestone, unscheduledOn rows, bars, and milestones: the schedule kind that renders.
data-level1, 2, 3On rows: the 1-based hierarchy level (any positive integer).
data-expandedpresentPresent on expanded parent rows and their toggle.
data-selectedpresentPresent on selected rows when selected is bound.
data-editablepresentPresent on editable rows, bars, and milestones.
data-invalidpresentPresent on rows with a taskErrors entry.
data-clipped-startpresentPresent on a bar whose start is before range.start.
data-clipped-finishpresentPresent on a bar whose finish is after range.finish.
data-danglingpresentPresent on a dependency line whose other task is not in tasks.
data-gantt-layerpresentPresent on the aria-hidden layer that holds the today marker and connectors.
data-gantt-monthpresentPresent on month labels in the timeline header.
data-gantt-daypresentPresent on day labels in the timeline header.
data-ghost-gantt-editorpresentPresent on the Edit dates dialog content, which is portaled to the body.
data-ghost-gantt-editor-overlaypresentPresent on the Edit dates dialog overlay.

CSS variables ​

NameDescription
--ghost-gantt-day-widthSet by your stylesheet: the width of one day column.
--ghost-gantt-row-heightSet by your stylesheet: the height of one row, used to place connectors.
--ghost-gantt-range-daysSet on the treegrid: the number of day columns in range.
--ghost-gantt-offsetSet on bars, milestones, the today marker, and header labels: day columns from range.start.
--ghost-gantt-daysSet on bars and header labels: visible day columns.
--ghost-gantt-rowsSet on the layer: the number of visible rows.
--ghost-gantt-from-daySet on connectors: the predecessor's finish edge (or marker centre) in day columns.
--ghost-gantt-from-rowSet on connectors: the predecessor's visible row index.
--ghost-gantt-to-daySet on connectors: the successor's start edge (or marker centre) in day columns.
--ghost-gantt-to-rowSet on connectors: the successor's visible row index.

Accessibility ​

Role: treegrid. APG pattern: https://www.w3.org/WAI/ARIA/apg/patterns/treegrid/.

Required ARIA attributes: aria-label, aria-level, aria-setsize, aria-posinset, aria-expanded, aria-selected, aria-readonly.

Keyboard ​

KeyActionAutomated browser test
TabInto the chart: focuses the remembered row, or the first visible row on first entry, or the named empty chart. From a row, leaves the chart.GhostGantt @component:GhostGantt › navigation keys: Tab entry and exit, arrows, Home, End, Ctrl+Home, Ctrl+End, Page keys (@ghostvue/vue)
Shift+TabSame entry target as Tab; leaves the chart backward.GhostGantt @component:GhostGantt › navigation keys: Tab entry and exit, arrows, Home, End, Ctrl+Home, Ctrl+End, Page keys (@ghostvue/vue)
ArrowDownNext visible row. No wrap.GhostGantt @component:GhostGantt › navigation keys: Tab entry and exit, arrows, Home, End, Ctrl+Home, Ctrl+End, Page keys (@ghostvue/vue)
GhostGantt @component:GhostGantt › selection: Space selects the focused row and arrows never change selection (@ghostvue/vue)
ArrowUpPrevious visible row. No wrap.GhostGantt @component:GhostGantt › navigation keys: Tab entry and exit, arrows, Home, End, Ctrl+Home, Ctrl+End, Page keys (@ghostvue/vue)
HomeFirst visible row.GhostGantt @component:GhostGantt › navigation keys: Tab entry and exit, arrows, Home, End, Ctrl+Home, Ctrl+End, Page keys (@ghostvue/vue)
EndLast visible row.GhostGantt @component:GhostGantt › navigation keys: Tab entry and exit, arrows, Home, End, Ctrl+Home, Ctrl+End, Page keys (@ghostvue/vue)
Ctrl+HomeFirst visible row.GhostGantt @component:GhostGantt › navigation keys: Tab entry and exit, arrows, Home, End, Ctrl+Home, Ctrl+End, Page keys (@ghostvue/vue)
Ctrl+EndLast visible row.GhostGantt @component:GhostGantt › navigation keys: Tab entry and exit, arrows, Home, End, Ctrl+Home, Ctrl+End, Page keys (@ghostvue/vue)
PageDownForward by the number of fully visible rows (at least one), stopping at the last row.GhostGantt @component:GhostGantt › navigation keys: Tab entry and exit, arrows, Home, End, Ctrl+Home, Ctrl+End, Page keys (@ghostvue/vue)
PageUpBackward by the number of fully visible rows (at least one), stopping at the first row.GhostGantt @component:GhostGantt › navigation keys: Tab entry and exit, arrows, Home, End, Ctrl+Home, Ctrl+End, Page keys (@ghostvue/vue)
ArrowRightLTR: expands a collapsed parent, or moves to the first child of an expanded parent; nothing on a leaf. Swapped with ArrowLeft in RTL.GhostGantt @component:GhostGantt › hierarchy keys: ArrowRight and ArrowLeft expand, collapse, and move in LTR and RTL (@ghostvue/vue)
ArrowLeftLTR: collapses an expanded parent, or moves from a child to its parent row; nothing on a root leaf or collapsed root. Swapped with ArrowRight in RTL.GhostGantt @component:GhostGantt › hierarchy keys: ArrowRight and ArrowLeft expand, collapse, and move in LTR and RTL (@ghostvue/vue)
EnterOn an editable row, opens the Edit dates dialog with focus in its first field. Otherwise nothing.GhostGantt @component:GhostGantt › Edit dates: Enter and F2 open the editor, Escape and Cancel discard, Save proposes once and the app accepts (@ghostvue/vue)
GhostGantt @component:GhostGantt › rejected edit: authoritative dates, visible and announced reason, retry available (@ghostvue/vue)
F2Same as Enter.GhostGantt @component:GhostGantt › Edit dates: Enter and F2 open the editor, Escape and Cancel discard, Save proposes once and the app accepts (@ghostvue/vue)
SpaceWhen selected is bound: selects the row in single mode, toggles it in multiple mode. Otherwise nothing.GhostGantt @component:GhostGantt › selection: Space selects the focused row and arrows never change selection (@ghostvue/vue)
EscapeIn the Edit dates dialog: closes it without emitting and returns focus to the row. On a row: not handled, so an enclosing dialog may close.GhostGantt @component:GhostGantt › Edit dates: Enter and F2 open the editor, Escape and Cancel discard, Save proposes once and the app accepts (@ghostvue/vue)
GhostGantt @component:GhostGantt › rejected edit: authoritative dates, visible and announced reason, retry available (@ghostvue/vue)

Verification ​

Each category is reviewed separately. Automated keyboard and axe results do not attest manual or assistive-technology review.

CategoryStatusEvidence
Automated keyboardPassedEvery declared key maps to a Chromium browser test that CI runs and requires to pass on every commit.
Manual interactionNot reviewedNo review recorded.
Assistive technologyNot reviewedNo review recorded.

Examples ​

gantt/release-plan ​

Example source

Read-only release plan Headless

A named treegrid with one Tab stop: rows read their title, inclusive dates, and finish-to-start dependencies, including a link to a task that is not in the schedule. Arrow keys move between rows and expand or collapse the release.

Task
Dates
Dependencies
Release
June 1 to June 10, 10 days
Design
June 1 to June 3, 3 days
Before Build starts (finish-to-start)
Build
June 4 to June 6, 3 days
After Design finishes (finish-to-start) Before Review starts (finish-to-start)
Review
June 7, 1 day
After Build finishes (finish-to-start) Before Launch starts (finish-to-start)
Launch
Milestone, June 9
After Review finishes (finish-to-start) After a missing task, qa, finishes (finish-to-start; not in this schedule)
Docs
Not scheduled

gantt/edit-dates ​

Example source

Edit dates Headless

Enter opens Edit dates on an editable row. The chart proposes one edit request; the application accepts it by supplying revised tasks, announces its own downstream changes with announce(), or rejects it with a taskErrors entry that is shown and announced.

Task
Dates
Dependencies
Release
June 1 to June 10, 10 days
Design
June 1 to June 3, 3 days
Before Build starts (finish-to-start)
Build
June 4 to June 6, 3 days
After Design finishes (finish-to-start) Before Review starts (finish-to-start)
Review
June 7, 1 day
After Build finishes (finish-to-start) Before Launch starts (finish-to-start)
Launch
Milestone, June 9
After Review finishes (finish-to-start)
Docs
Not scheduled