Prerequisites
SVAR Svelte Gantt 2.x requires Svelte 5. If you are on Svelte 4, see the Svelte 4 note below.Install the package
Svelte 4
There are two published versions of SVAR Svelte Gantt:| Version | Target | Package |
|---|---|---|
| 2.x (current) | Svelte 5 | @svar-ui/svelte-gantt |
| 1.x | Svelte 4 | [email protected] |
This documentation covers 2.x (Svelte 5). If you are on Svelte 4, use
[email protected].What is included
The package exports the following components and utilities:| Export | Type | Description |
|---|---|---|
Gantt | Component | The main Gantt chart component |
Toolbar | Component | Optional toolbar with built-in actions |
Editor | Component | Task edit form |
ContextMenu | Component | Right-click context menu |
Tooltip | Component | Custom tooltip wrapper |
HeaderMenu | Component | Grid column header menu |
Willow | Theme | Default light theme wrapper |
Material | Theme | Material design theme wrapper |
WillowDark | Theme | Dark theme wrapper |
version | string | Current package version string |
defaultEditorItems | Array | Default editor field configuration |
defaultToolbarButtons | Array | Default toolbar button configuration |
defaultMenuOptions | Array | Default context menu options |
defaultColumns | Array | Default grid column definitions |
defaultTaskTypes | Array | Default task type definitions |
getEditorItems() | Function | Returns editor items merged with config |
getToolbarButtons() | Function | Returns toolbar buttons merged with config |
getMenuOptions() | Function | Returns menu options merged with config |
registerScaleUnit() | Function | Register a custom time scale unit |
registerEditorItem() | Function | Register a custom editor field component |
Theme setup
SVAR Svelte Gantt ships with three themes:Willow (light), WillowDark (dark), and Material. Each theme is a Svelte component that wraps your Gantt instance and injects the required CSS custom properties.
Wrap your <Gantt> component in a theme wrapper:
- Willow (light)
- WillowDark
- Material
Next steps
Quickstart
Build a working Gantt chart in minutes with a step-by-step guide.
Tasks and links
Learn the data structures for tasks, links, and milestones.