Svelte Gantt Chart

A Gantt view of the grid - one gantt prop, phases, dependency arrows, drag to reschedule, a critical path - is in progress in @svgrid/enterprise and due on 1 November 2026; it is on the roadmap. Until then, what SvGrid has is a grid with custom cells, and a Gantt row is a task on the left and one wide cell on the right whose bar is positioned by percentage of the project span. That is exactly how the demo below is built, in one file you can copy.

If your plan is really a schedule of bookings across resources rather than a work-breakdown structure, the enterprise scheduler timeline is the better fit today: it draws real bars on a time axis with drag to re-time and resize, one lane per person or asset.

Turn it on: cell: (ctx) => renderSnippet(TimelineCell, …)

Install

npm i @svgrid/grid

Free and MIT-licensed in @svgrid/grid: no license key, no row cap, no watermark.

The code

<script lang="ts">
  import { SvGrid, renderSnippet, type ColumnDef } from '@svgrid/grid'
</script>

{#snippet TimelineCell({ row })}
  <div class="track">
    <div
      class="bar"
      style:left="{((+new Date(row.start) - projectStart) / projectSpan) * 100}%"
      style:width="{((+new Date(row.end) - +new Date(row.start)) / projectSpan) * 100}%"
    ></div>
  </div>
{/snippet}

<SvGrid
  data={tasks}
  columns={[
    { field: 'name', header: 'Task', width: 240 },
    { field: 'end', header: 'Schedule', width: 400,
      cell: (ctx) => renderSnippet(TimelineCell, { row: ctx.row.original }) },
  ]}
/>

What you get

Live examples

Documentation

Related articles

Frequently asked questions

Does SvGrid have a Gantt chart component?

Not yet. A Gantt view of the grid - one gantt prop, phases that roll up, dependency arrows, drag to reschedule, a critical path - is in progress in @svgrid/enterprise and due on 1 November 2026. Until then a Gantt is built as a grid with one wide custom cell per row that positions task bars by date, which is what the example on this page does.

Can I use the scheduler as a Gantt chart?

For resource and booking timelines, yes. The scheduler's timeline views draw bars on a time axis with drag to re-time and resize. It is not a project planner: no critical path, baselines or work-breakdown structure. Those are what the Gantt view due on 1 November 2026 adds.

Can tasks have dependencies?

The enterprise scheduler has optional dependencies for ordered bookings, where a job moves through stations in sequence. They are opt-in, and without dependency config the timeline draws no arrows and cascades nothing.

Is it free?

The grid-based recipe is MIT-licensed in @svgrid/grid. The scheduler timeline needs the commercial @svgrid/enterprise package, and so will the Gantt view when it ships.

Build something else

Get started · Browse the gallery · Pricing