TidalUI

Gantt chart preview

Inspect project dates and dependencies with an exact timeline and a readable mobile task list.

pro · Data · composite

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/gantt-chart

Import components/ui/tidal.css, components/ui/gantt-chart.css. Wrap installed components in tidal-scope.

Preview

Gantt chart component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/gantt-chart.css";
import{TidalGanttChart}from"./components/ui/gantt-chart";
export default()=><div className="tidal-scope"><TidalGanttChart onSelectedChange={() => {}} selectedId={"example"} tasks={[{id:"example",label:"Demo",start:"value",end:"value"}]} title={"Demo"}/></div>;

API and props

TidalGanttChart.onSelectedChange (required)
(id: string, event: MouseEvent<HTMLButtonElement>) => void

Callback invoked when the selected change interaction is proposed.

TidalGanttChart.selectedId (required)
string | null

Required selected id value accepted by this exported component.

TidalGanttChart.tasks (required)
ReadonlyArray<TidalGanttTask>

Required tasks value accepted by this exported component.

TidalGanttChart.title (required)
ReactNode

Required title value accepted by this exported component.

TidalGanttChart.description
ReactNode

Optional description value accepted by this exported component.

TidalGanttChart.disabled
boolean | undefined

Optional disabled value accepted by this exported component.

TidalGanttChart.formatDate
((date: string) => string) | undefined

Optional format date value accepted by this exported component.

TidalGanttChart.headingLevel
"h2" | "h3" | "h4" | "h5" | undefined

Optional heading level value accepted by this exported component.

TidalGanttChart.labels
Partial<{ empty: string; invalid: string; dependencies: string; none: string; period: string; range: string; selected: string; start: string; finish: string; }> | undefined

Optional labels value accepted by this exported component.

TidalGanttChart.referenceDate
string | undefined

Optional reference date value accepted by this exported component.

TidalGanttChart.referenceLabel
string | undefined

Optional reference label value accepted by this exported component.

TidalGanttChart.taskButtonProps
((task: TidalGanttTask) => Omit<ComponentPropsWithoutRef<"button">, "children" | "dangerouslySetInnerHTML" | "type" | "disabled" | "aria-pressed" | "role" | "aria-label" | "aria-labelledby">) | undefined

Optional task button props value accepted by this exported component.

TidalGanttChart.taskButtonRef
((task: TidalGanttTask) => Ref<HTMLButtonElement> | undefined) | undefined

Optional task button ref value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas