columns prop controls which columns appear in the grid panel on the left side of
the Gantt chart. Pass an array of column definition objects, or set columns={false} to
hide the grid entirely.
Default columns
When thecolumns prop is omitted, the Gantt renders four built-in columns:
Hiding the grid
Setcolumns={false} to render only the chart area with no grid panel.
Custom columns example
The following example mirrors the fixed-width column layout fromGanttFixedColumns.svelte:
GanttGrid.svelte):
IGanttColumn fields
Column identifier. Built-in ids with special behaviour:
"text" (task name with
indent), "start", "end", "duration", "add-task" (button to add sibling tasks).
Any other string maps to a custom property on the task object.Column header text, or an object/array for multi-row headers with filters.
Pass
{ cell: SvelteComponent } to render a custom Svelte component as the header.Column width in pixels. Ignored when
flexgrow is set. The "add-task" column
defaults to 50.CSS
flex-grow factor. When set, the column expands to fill available space instead
of using a fixed width. The default "text" column uses flexgrow: 1.Horizontal alignment of cell content.
Whether the column can be resized by dragging its border. Set to
false for
fixed-size utility columns such as "add-task".Whether clicking the header sorts the grid by this column. Defaults to
false for
the "add-task" column.Function returning an HTML string rendered as the cell content. Use for simple text
transformations. For rich UI, prefer
cell (a Svelte component).A Svelte component rendered inside each data cell. The component receives the task
object as a prop. Takes priority over
template.Inline editor configuration activated when a cell is double-clicked. Pass an editor
type string (e.g.
"datepicker"), an editor config object, or a function
(task, column) => editorConfig | null for conditional editing.Date columns (start, end, duration) automatically disable editing for task types
where the field is not applicable (e.g. end is read-only on milestones).Custom value extractor called when the column reads the task object. Useful when the
display value needs to be computed from multiple task fields.