@svar-ui/react-gantt and re-exported from the underlying @svar-ui/gantt-store package.
ITask
Represents a single row in the Gantt chart. Both tasks and milestones share this interface.Unique identifier for the task.
Display label shown in the grid and on the task bar.
Start date of the task. Can be computed from
duration if omitted for certain task types.End date of the task. Mutually exclusive with
duration — provide one or the other.Task length in
durationUnit units (default: days). Alternative to providing end.Completion percentage, from
0 to 100.ID of the parent task. Use
0 or omit for root-level tasks.Task type. Built-in values:
"task" (default), "summary", "milestone". Custom types can be registered via taskTypes.Whether a summary task node is expanded. Defaults to
false.When
true, child data for this task has not been loaded yet. The Gantt fires the request-data event when the node is expanded.Pre-loaded child tasks. When populated, the task renders as a summary node in the grid.
Example
IConfig
Configuration props passed directly to the<Gantt> component (excluding the React-specific and event callback props).
The array of task objects to display.
Dependency links between tasks. Each link has
id, source, target, and type fields.Time scale configuration. Each scale entry defines
unit, step, and format.Grid column definitions. Pass
false to hide the grid entirely.Explicit chart start date. When
null, derived automatically from task dates.Explicit chart end date. When
null, derived automatically from task dates.Width in pixels of a single time unit cell. Default:
100.Row height in pixels. Default:
38.Height of the header scale row in pixels. Default:
36.The time unit used to measure cell width (
"day", "hour", etc.). Default: "day".The time unit used to interpret the
duration field on tasks. Default: "day".Enables or configures zoom.
true enables the default zoom. An object configures zoom levels and scale sets.When
true, the chart automatically adjusts its visible range to fit all tasks. Default: true.Disables all editing interactions when
true. Default: false.Renders baseline bars for tasks that have
base_start and base_end fields. Default: false.Shows tasks that have no start/end dates in a separate unscheduled panel. Default:
false.Enables split-task (segmented bar) support. Default:
false.Enables undo/redo history. Default:
false.Array of currently selected task IDs (controlled).
The ID of the task currently open in the editor (controlled).
Timeline marker definitions. Each marker has
start, text, and optional css fields.Custom task type definitions. Each entry specifies
id, label, and rendering options.Critical path configuration. When set, highlights the critical path on the chart.
Auto-scheduling configuration.
{ type: 'forward' } (default) enables basic forward scheduling from projectStart. { auto: true } enables full auto-scheduling where task dates are continuously recalculated from Finish-to-Start dependencies.Fixed project start date used by the auto-scheduler.
Fixed project end date used by the auto-scheduler.
A
Calendar instance defining working days and hours. Automatically highlights non-working time.Summary task behaviour configuration. E.g.
{ autoProgress: true } to automatically roll up child progress.A function that returns a CSS class name for a given time cell, used to highlight weekends or holidays.
IApi
The programmatic API object returned via theinit prop or a React ref. See the Gantt API reference for full method documentation.
IGanttColumn
The base column definition used internally by the Gantt store. The public-facingIColumnConfig extends this with additional grid-level options.
Unique column identifier, also used as the property key on task objects.
Column header label.
Column width in pixels.
Flex-grow factor. Mutually exclusive with
width.Enables click-to-sort on this column. Default:
true.Cell content alignment.
IColumnConfig
ExtendsIGanttColumn with additional cell, header, and editor configuration provided by the underlying grid component.
Custom cell renderer. A component or render function that receives the row data.
Custom header renderer. Overrides the plain
string header from IGanttColumn.Inline cell editor configuration. When set, clicking a cell in this column opens an inline editor instead of the task editor panel.
Example
GanttActions
A utility type that deriveson* callback props from the store’s TMethodsConfig. It generates camelCase prop names by removing hyphens from action names.
on and converting each hyphen-separated segment to PascalCase:
| Action name | Prop name |
|---|---|
add-task | onAddTask |
update-task | onUpdateTask |
delete-task | onDeleteTask |
select-task | onSelectTask |
sort-tasks | onSortTasks |
show-editor | onShowEditor |
zoom-scale | onZoomScale |
move-task | onMoveTask |
scroll-chart | onScrollChart |
drag-task | onDragTask |
open-task | onOpenTask |
add-link | onAddLink |
delete-link | onDeleteLink |
TMethodsConfig
A record type mapping each action/event name to its payload shape. Defined in@svar-ui/gantt-store and used to derive both GanttActions props and the IApi event handler signatures.