Vanilla TypeScript
Create a revo-grid element and configure Gantt through public element
properties. Start with
TypeScript
import '@revolist/ui/styles.css';import './gantt.scss';import { mountShowcase } from './gantt-showcase-mount';
export { mountShowcase } from './gantt-showcase-mount';
export function load(parentSelector: string): (() => void) | undefined { const parent = document.querySelector(parentSelector); if (!(parent instanceof HTMLElement)) return; return mountShowcase(parent);}import '@revolist/ui/styles.css';import './gantt.scss';import React, { useEffect, useState } from 'react';import { RevoGrid } from '@revolist/react-datagrid';import { GanttToolbar } from '@revolist/gantt/react';import { currentTheme, observeCurrentTheme } from '../../theme';import { configureMobileGanttPanel } from '../../mobile-gantt-panel';import { createGanttShowcaseState } from './gantt-showcase-state';
export default function GanttShowcase() { const [state] = useState(createGanttShowcaseState); const [isDark, setIsDark] = useState(() => currentTheme().isDark()); const [grid, setGrid] = useState<HTMLRevoGridElement | null>(null); const theme = isDark ? 'darkCompact' : 'compact'; const appearance = isDark ? 'dark' : 'light';
useEffect(() => observeCurrentTheme(setIsDark), []); useEffect(() => { if (grid) return configureMobileGanttPanel(grid); }, [grid]);
return ( <section className={`gantt-showcase-shell grow h-full gantt-showcase-shell--${appearance}`}> <div className="gantt-showcase-controls"> {grid && <GanttToolbar grid={grid} options={state.toolbarOptions} />} </div> <RevoGrid ref={setGrid} className="gantt-showcase-grid" theme={theme} readonly={false} range resize rowSize={42} rowHeaders={false} hideAttribution autoSizeColumn={false} plugins={state.plugins} hideColumns={state.hiddenColumns} columns={state.columns} gantt={state.gantt} ganttDependencies={state.dependencies} ganttCalendars={state.calendars} ganttResources={state.resources} ganttAssignments={state.assignments} ganttBaselines={state.baselines} source={state.source} /> </section> );}<script setup lang="ts">import '@revolist/ui/styles.css';import { onBeforeUnmount, onMounted, ref, shallowRef } from 'vue';import RevoGrid from '@revolist/vue3-datagrid';import { GanttToolbar } from '@revolist/gantt/vue';import { currentTheme, observeCurrentTheme } from '../../theme';import { configureMobileGanttPanel } from '../../mobile-gantt-panel';import { createGanttShowcaseState } from './gantt-showcase-state';
const state = createGanttShowcaseState();const isDark = ref(currentTheme().isDark());const grid = shallowRef<HTMLRevoGridElement>();let disconnectTheme: (() => void) | undefined;let disconnectMobilePanel: (() => void) | undefined;
function connectGrid(event: Event) { const element = event.target as HTMLRevoGridElement; if (grid.value === element) return; disconnectMobilePanel?.(); grid.value = element; disconnectMobilePanel = configureMobileGanttPanel(element);}
onMounted(() => { disconnectTheme = observeCurrentTheme((dark) => { isDark.value = dark; });});
onBeforeUnmount(() => { disconnectTheme?.(); disconnectMobilePanel?.();});</script>
<template> <section class="gantt-showcase-shell grow h-full" :class="isDark ? 'gantt-showcase-shell--dark' : 'gantt-showcase-shell--light'" > <div class="gantt-showcase-controls"> <GanttToolbar v-if="grid" :grid="grid" :options="state.toolbarOptions" /> </div> <RevoGrid class="gantt-showcase-grid" :theme="isDark ? 'darkCompact' : 'compact'" :readonly="false" range resize :row-size="42" :row-headers="false" hide-attribution :auto-size-column="false" :plugins="state.plugins" :hide-columns.prop="state.hiddenColumns" :columns="state.columns" :gantt.prop="state.gantt" :gantt-dependencies.prop="state.dependencies" :gantt-calendars.prop="state.calendars" :gantt-resources.prop="state.resources" :gantt-assignments.prop="state.assignments" :gantt-baselines.prop="state.baselines" :source="state.source" @aftergridinit="connectGrid" /> </section></template>
<style src="./gantt.scss" lang="scss"></style>import '@revolist/ui/styles.css';import { Component, NO_ERRORS_SCHEMA, ViewEncapsulation, signal,} from '@angular/core';import type { OnDestroy } from '@angular/core';import { RevoGrid } from '@revolist/angular-datagrid';import { GanttToolbar } from '@revolist/gantt/angular';import { currentTheme, observeCurrentTheme } from '../../theme';import { configureMobileGanttPanel } from '../../mobile-gantt-panel';import { createGanttShowcaseState } from './gantt-showcase-state';
@Component({ selector: 'gantt-showcase-grid', standalone: true, host: { class: 'gantt-showcase-angular-host', }, schemas: [NO_ERRORS_SCHEMA], imports: [RevoGrid, GanttToolbar], encapsulation: ViewEncapsulation.None, styleUrls: ['./gantt.scss'], template: ` <section class="gantt-showcase-shell grow h-full" [class.gantt-showcase-shell--dark]="isDark()" [class.gantt-showcase-shell--light]="!isDark()" > <div class="gantt-showcase-controls"> @if (grid(); as element) { <revo-gantt-toolbar [grid]="element" [options]="state.toolbarOptions" /> } </div> <revo-grid class="gantt-showcase-grid" [theme]="isDark() ? 'darkCompact' : 'compact'" [readonly]="false" [range]="true" [resize]="true" [rowSize]="42" [rowHeaders]="false" [hideAttribution]="true" [autoSizeColumn]="false" [plugins]="state.plugins" [hideColumns]="state.hiddenColumns" [columns]="state.columns" [gantt]="state.gantt" [ganttDependencies]="state.dependencies" [ganttCalendars]="state.calendars" [ganttResources]="state.resources" [ganttAssignments]="state.assignments" [ganttBaselines]="state.baselines" [source]="state.source" (aftergridinit)="connectGrid($event)" ></revo-grid> </section> `,})export class GanttShowcaseGridComponent implements OnDestroy { readonly state = createGanttShowcaseState(); readonly isDark = signal(currentTheme().isDark()); readonly grid = signal<HTMLRevoGridElement | null>(null);
private readonly disconnectTheme = observeCurrentTheme((dark) => { this.isDark.set(dark); }); private disconnectMobilePanel?: () => void;
connectGrid(event: Event): void { const element = event.target as HTMLRevoGridElement; if (this.grid() === element) return; this.disconnectMobilePanel?.(); this.grid.set(element); this.disconnectMobilePanel = configureMobileGanttPanel(element); }
ngOnDestroy(): void { this.disconnectTheme(); this.disconnectMobilePanel?.(); }}Vanilla TypeScript
Create a revo-grid element and configure Gantt through public element
properties. Start with
TypeScript
React
Bind Gantt properties through @revolist/react-datagrid. Start with
React
Vue 3
Use @revolist/vue3-datagrid with reactive project collections. Start with
Vue
Angular
Use the standalone RevoGrid wrapper and property bindings. Start with
Angular
tasks + calendars + dependencies + resources + assignments │ ▼ deterministic scheduler │ ▼ projected task rows + timeline geometry │ ▼ RevoGrid rendering and interaction surfaceYour application owns project data and persistence. GanttPlugin validates and schedules that data, projects it into task-table rows and timeline geometry, and routes supported edits back through Gantt mutation services. RevoGrid owns virtualization, columns, selection, keyboard navigation, and the browser rendering lifecycle.
For keyboard navigation, task-bar shortcuts, and guidance for accessible customizations, see Accessibility and Keyboard Navigation.
Use the AI Assistant to read permitted scheduled fields and approve scoped task updates through native Gantt APIs.