CLI previewInstall commands shown on this site are not released yet.

DocsComponentsAdvanced

Gantt

React example follows below.
ts
import { Gantt } from "@grassroot/ui-react/advanced";
const rows = [
{ name: "Ledger v2 rewrite", sub: "platform", start: 0, end: 1.6, color: "var(--accent)" },
{ name: "Billing migration", sub: "payments", start: 1.2, end: 2.5, color: "var(--vs-success)" },
];
<Gantt rows={rows} today={2.45} />
ts
<script setup lang="ts">
import { Gantt } from "@grassroot/ui-vue";
const rows = [
{ name: "Ledger v2 rewrite", sub: "platform", start: 0, end: 1.6, color: "var(--accent)" },
{ name: "Billing migration", sub: "payments", start: 1.2, end: 2.5, color: "var(--vs-success)" },
];
</script>
<template>
<Gantt :rows="rows" :today="2.45" />
</template>
ts
import { Component } from "@angular/core";
import { GrassrootGantt } from "@grassroot/ui-angular";
@Component({
selector: "app-example",
standalone: true,
imports: [GrassrootGantt],
template: `
<grassroot-gantt [rows]="rows" [today]="2.45" />
`,
})
export class ExampleComponent {
readonly rows = [
{ name: "Ledger v2 rewrite", sub: "platform", start: 0, end: 1.6, color: "var(--accent)" },
{ name: "Billing migration", sub: "payments", start: 1.2, end: 2.5, color: "var(--vs-success)" },
];
}
ts
<script lang="ts">
import { Gantt } from "@grassroot/ui-svelte";
const rows = [
{ name: "Ledger v2 rewrite", sub: "platform", start: 0, end: 1.6, color: "var(--accent)" },
{ name: "Billing migration", sub: "payments", start: 1.2, end: 2.5, color: "var(--vs-success)" },
];
</script>
<Gantt rows={rows} today={2.45} />
ts
import { Gantt } from "@grassroot/ui-solid";
const rows = [
{ name: "Ledger v2 rewrite", sub: "platform", start: 0, end: 1.6, color: "var(--accent)" },
{ name: "Billing migration", sub: "payments", start: 1.2, end: 2.5, color: "var(--vs-success)" },
];
export function Example() {
return (
<>
<Gantt rows={rows} today={2.45} />
</>
);
}

Installation

bash
pnpm dlx grassroot add ui/gantt
bash
npx grassroot@latest add ui/gantt
bash
yarn dlx grassroot add ui/gantt
bash
bunx grassroot add ui/gantt

API Reference

GanttProps
PropTypeDefault
rowsrequiredCoreGanttRow[]
columnsColumn tick labels across the top.string[] | undefined["Q1","Q2","Q3","Q4"]
today"Today" position as a fraction across the axis (0..units). Omit to hide.number | undefined
labelHeadingHeading for the first (label) column.string | undefined"Workstream"