@dhtmlx/trial-react-gantt

中文文档
10.0.3发布于 2026/09/03SEE LICENSE IN license.txtTypeScriptES Module零依赖近 30 天下载 2991

DHTMLX Gantt for React

原始使用文档
文档目录7 节
  1. Getting started
  2. Requirements
  3. Complete guides
  4. Features
  5. License
  6. Useful links
  7. Follow us

DHTMLX React Gantt

dhtmlx.com npm: v.10.0.3 License: Evaluation

Getting started | Features | License | Useful links | Follow us

DHTMLX React Gantt is a React wrapper for the DHTMLX Gantt library.

It provides a declarative way to integrate all of DHTMLX Gantt's rich project scheduling features - such as tasks, dependencies, auto-scheduling, and resource management - directly into React apps. By combining React's component-based workflow with DHTMLX Gantt's robust JavaScript engine, this library delivers a seamless experience for building interactive Gantt charts in modern React projects.

Important: this npm package is a trial build intended for evaluation only. For access to commercial licenses and technical support, please request an evaluation on our website: https://dhtmlx.com/docs/products/dhtmlxGantt-for-React/download.shtml

Getting started

Install package

Professional Evaluation version:

npm install @dhtmlx/trial-react-gantt

And initialize:

import { useState } from 'react';
import ReactGantt from '@dhtmlx/trial-react-gantt';
import '@dhtmlx/trial-react-gantt/dist/react-gantt.css';
import { demoData } from './DemoData'

export default function BasicGantt() {
  const [theme, setTheme] = useState("terrace");
  const [tasks, setTasks] = useState(demoData.tasks);
  const [links, setLinks] = useState(demoData.links);

  return (
    <div style={{ height: '500px' }}>
      <ReactGantt
        tasks={tasks}
        links={links}
        theme={theme}
      />
    </div>
  );
}

demoData is an example tasks/links dataset. Replace it with your own project data.

Requirements

  • React 18.x or newer

Complete guides

Features

  • React components in templates of grid cells, headers, timelines
  • easy customization with React components
  • seamless theming and MUI compatibility
  • compatibility with Redux Toolkit
  • TypeScript support
  • 4 types of tasks linking: finish-to-start, start-to-start, finish-to-finish, start-to-finish
  • dragging and dropping multiple tasks horizontally
  • multi-task selection
  • backward planning
  • tasks filtering
  • resources filtering
  • inline editing
  • managing editability/readonly modes of individual tasks
  • undo/redo functionality
  • configurable columns in the grid
  • customizable time scale and task edit form
  • progress percent coloring for tasks
  • 7 different skins
  • online export to PDF, PNG, Excel, iCal, and MS Project
  • 32 locales
  • keyboard navigation
  • resource management
  • critical path calculation
  • auto scheduling

License

DHTMLX Gantt for React v.10.0.3 Professional Evaluation

This software is covered by DHTMLX Evaluation License. Contact [email protected] to get a proprietary license. Usage without proper license is prohibited.

(c) XB Software

Follow us

版本与发布记录

@dhtmlx/trial-react-gantt 共发布 18 个版本,首次发布于 2021/03/22;过去 12 个月发布了 10 个版本。

版本发布日期距今
10.0.3latest2026/09/032 个月前
10.0.22026/08/202 个月前
10.0.12026/08/043 个月前
10.0.02026/06/115 个月前
9.1.42026/04/286 个月前
9.1.32026/03/167 个月前

其他发布通道:beta → 9.1.1-beta.2。

关于 @dhtmlx/trial-react-gantt 的常见问题

@dhtmlx/trial-react-gantt 是什么?

DHTMLX Gantt for React

如何安装 @dhtmlx/trial-react-gantt?

在项目目录运行 npm install @dhtmlx/trial-react-gantt,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(>=18.0.0)、react-dom(>=18.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@dhtmlx/trial-react-gantt 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@dhtmlx/trial-react-gantt 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@dhtmlx/trial-react-gantt 可以商用吗?

@dhtmlx/trial-react-gantt 使用 SEE LICENSE IN license.txt 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@dhtmlx/trial-react-gantt 的下载量有多少?

根据 npm 官方下载统计,@dhtmlx/trial-react-gantt 在 2026/10/12 – 2026/11/10 这 30 天内被下载 2,991 次,日均约 100 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@dhtmlx/trial-react-gantt 还在维护吗?

最新版本 10.0.3 发布于 2026/09/03(2 个月前);至今共发布 18 个版本,其中过去 12 个月发布了 10 个;首次发布于 2021/03/22。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。