IGanttColumn type defines a column in the Gantt’s left-side grid. Pass an array of column definitions to the columns prop on the <Gantt> component.
TypeScript definition
Fields
The field name from the task object to display in this column. For example,
"text" renders the task’s text property. Built-in special IDs include "add-task" (renders the add-task button column).Column header configuration. Accepts:
- A plain string label
- An object
{ text: string, css?: string }for styled headers - An array for multi-row headers (one entry per header row)
Fixed column width in pixels. Use
flexgrow instead for proportional sizing.Flex-grow factor for proportional width distribution among columns that have
flexgrow set. Works similarly to CSS flex-grow.Horizontal alignment of cell content.
When
true, the user can drag the column border to resize it.When
true, clicking the column header sorts tasks by this column.A function returning an HTML string to render in the cell body. Use this to customize the cell content beyond the raw field value.
A Svelte component rendered as the cell body. Receives the task object as a prop. Use when you need reactive Svelte markup inside a cell.
Inline cell editor configuration. Defines the input type and options used when a user clicks to edit the cell. Mirrors the editor config from
@svar-ui/svelte-grid.Options array for editor fields of type
select, combo, or multiselect. Each option is { id: any, label: string }.Custom accessor function that derives the display value from the task object. Use when the field to display is not a direct property (e.g., formatted dates, combined fields).
Examples
- Basic columns
- With inline editor
- Using defaultColumns
Pass
columns={false} to the <Gantt> component to hide the grid entirely and show only the chart.