# react-simple-gantt

> ## Install

Latest version **1.0.4** (published 2020-11-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-simple-gantt
pnpm add react-simple-gantt
yarn add react-simple-gantt
bun add react-simple-gantt
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2020-11-30 |
| First published | 2020-11-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 15.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | takuya.takada |

## Links

- npm: https://www.npmjs.com/package/react-simple-gantt
- npm.io page: https://npm.io/package/react-simple-gantt

## Dependencies (2)

- [dayjs](https://npm.io/package/dayjs.md) ^1.9.6
- [react-cool-dimensions](https://npm.io/package/react-cool-dimensions.md) ^1.1.10

## Recent versions

- 1.0.4 (latest) — 2020-11-30
- 1.0.3 — 2020-11-30
- 1.0.2 — 2020-11-30
- 1.0.1 — 2020-11-30
- 1.0.0 — 2020-11-30

## README

# React Simple Gantt

## Install

- yarn

```sh
yarn add react-simple-gantt
```

- npm

```sh
npm install --save react-simple-gantt
```

## Usage

### import

```jsx
import SimpleGantt from "react-simple-gantt";
```

### props

- tasks (required)
    - type: array
    
    Specify array of tasks.
    
    Task format is { id: string; name: string; start: string; end: string; progress: number }


- viewMode (optional)
    - type: string(Day|Week|Month)
    - Default: "Day"
    
    Can change view mode.
    
- onClick (optional)
    - type: function
    - Default: (task) => console.log(task)
    
     You can set action when click task name.
    
- height (optional)
    - Type: string
    - Default: "300px"
    
    Gantt chart height setting.
    
- headerWidth (optional)
    - Type: number
    - Default: 140
    
    Task name column width setting.

#### Example

```jsx
import React from "react"
import SimpleGantt from "react-simple-gantt";
...
      <SimpleGantt
        // required props
        tasks={
          [
            {
              id: "task1",
              name: "Plan-1",
              start: "2020-11-30T00:00:00",
              end: "2020-11-30T23:59:59",
              progress: 100,
            },
            {
              id: "task2",
              name: "Do-1",
              start: "2020-12-01T00:00:00",
              end: "2020-12-01T23:59:59",
              progress: 50,
            },
            ...
          ]
        }
        // optional props
        viewMode="Day" // Day|Week|Month
        onClick={(task) => console.log(task)}
        height="300px" // Default is 300px
        headerWidth={140} // Default is 140(px)
      />
```

## Demo

https://takuyatakada.github.io/react-simple-gantt/

![demo](demo/demo.png)

## License

[MIT](LICENSE)

---
_Source: https://npm.io/package/react-simple-gantt · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
