Skip to content

API reference

The reference lists every public export of the three packages: functions, interfaces, type aliases and constants, with their parameters, return types, defaults and examples. It is generated from the TSDoc comments of the source by TypeDoc each time the site is built, so it always describes the code the site was built from. Members marked @internal are not part of it.

The guides explain how the pieces fit together; this section is where to look up a name, a signature or a field.

The reference is grouped by package. Each package has one page per entry point of its exports, which lists everything that entry exports, and one page per export.

Import Entry
@ganttlane/core The core
@ganttlane/core/schema TaskSchema and LinkSchema: valibot schemas to check and extend your data
@ganttlane/core/migrate fromFrappeGanttOptions: options of frappe-gantt turned into ganttlane’s
@ganttlane/dom createGantt, Gantt, the options and the renderer
@ganttlane/dom/facade createChart: the part of createGantt that needs no DOM
@ganttlane/dom/dom-utils Helpers shared by renderers: listeners, positioning, pointer input
@ganttlane/react Gantt, GanttRoot, GanttChart, TaskList, the hooks and their types
@ganttlane/react/core patchTasks and the types, without the client directive

@ganttlane/dom and @ganttlane/react re-export the types of the core that you meet around a chart (Task, Link, TaskRecord, ChangeSet, …). In the reference, a re-export links to the page where the type is defined, which is the core’s.

  • Pages are by kind. In a package’s sidebar group the pages are listed under Functions, Interfaces, Type Aliases and Variables. A type that is an object shape, such as an options or a payload type, is an interface or a type alias; a React component is a variable.
  • Type parameters. TData is the type of task.data. It flows from the options to every handler and result, so a chart made with createGantt<MyData>(...) hands you MyData back.
  • Defaults are in the description of a field (for example “Default 'today'”); the Options guide has them in tables, by group.
  • Defined in at the top of a page links to the source file on GitHub.