# Gantt

> Tasks and milestones on a time axis: a bar per task with its progress, the owner, week lines and today's line.

Component · CRM · Halo kit · [Live page](https://ui.twentyfirst.media/halo/components/Gantt/)

Tasks and milestones on a time axis: a bar per task with its progress, the owner, week lines and
today's line.

- Each task reads out its range and progress ("Design, Nov 9 to Nov 20, 70% done");
  `onOpen(id)` makes the name a button.
- The chart keeps 16px per day and scrolls sideways inside its box on small screens.

## Example

```tsx
import { Gantt, Panel } from "@twentyfirstmedia/halo";
import { PLAN } from "./_sales";

export default function Preview() {
  return (
    <Panel title="Website relaunch" subtitle="Nordhafen Outdoor · Nov 2 to Dec 14">
      <Gantt tasks={PLAN} today={new Date(2026, 10, 16)} onOpen={() => {}} />
    </Panel>
  );
}
```

## Props

### Gantt

| Prop | Type | Notes |
| --- | --- | --- |
| `tasks` | `GanttTask[]` | Required |
| `from?` | `Date \| string \| number` | First and last day shown (default: the tasks' range). |
| `to?` | `Date \| string \| number` |  |
| `today?` | `Date \| string \| number` | Draws the today line. |
| `onOpen?` | `(id: string) => void` | Makes each task a button. |
| `label?` | `string` | Accessible name (default "Timeline"). |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |

### Panel

| Prop | Type | Notes |
| --- | --- | --- |
| `side?` | `boolean` |  |
| `title?` | `string` |  |
| `subtitle?` | `string` |  |
| `action?` | `ReactNode` |  |
| `children?` | `ReactNode` |  |
| `surface?` | `Surface` | `"glass"`: translucent glass over what is behind (maps, 3D, video, photos); `"solid"` opts out inside a glass `UIProvider`. |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |
