Skip to content
GitHub
API reference

Slots & owner state

Component overrides, slot props, and the state exposed to customization callbacks.

Usage

import type { GanttBarsSlots } from "@art-tools/react-gantt";

const bars: GanttBarsSlots = {
  taskBar: {
    slotProps: {
      root: { className: "my-task-bar" },
    },
  },
};

// <Gantt tasks={tasks} bars={bars} />
  • slots replaces an element or component. slotProps supplies props directly or through an ownerState callback. The types below describe each component's available slots and state.
  • mergeSlotProps combines class names and shallow-merges styles, with consumer styles taking precedence. Other props replace internal values, including event handlers, so preserve required behavior when overriding a handler.
  • On Gantt, customization is grouped under taskList, bars, dependencySlots, and timeline. On the composable path, GanttSlotsProvider receives bars, dependencies, and timeline through value; TaskList receives its slots directly.
  • The remaining exports below include per-component slot configurations, owner states, and dependency geometry used by those states. Import them as types when annotating custom renderers.
export declare function GanttSlotsProvider(props: {
    value: GanttSlotsValue;
    children: ReactNode;
}): JSX.Element;

Read the grid-side slot groups. Returns `{}` outside a provider.

/** Read the grid-side slot groups. Returns `{}` outside a provider. */
export declare function useGanttSlots(): GanttSlotsValue;

The grid-side slot groups delivered through context (bars/dependencies/ timeline). The `taskList` group is prop-drilled separately and is NOT here.

GanttSlotsValue documented properties
PropertyType & description
barsOptionalGanttBarsSlots
dependenciesOptionalGanttDependenciesSlots
timelineOptionalGanttTimelineSlots
TypeScript declaration
/**
 * The grid-side slot groups delivered through context (bars/dependencies/
 * timeline). The `taskList` group is prop-drilled separately and is NOT here.
 */
export declare interface GanttSlotsValue {
    bars?: GanttBarsSlots;
    dependencies?: GanttDependenciesSlots;
    timeline?: GanttTimelineSlots;
}

Slots for the task-list pane. Delivered by prop-drilling (see `<Gantt taskList>`).

GanttTaskListSlots documented properties
PropertyType & description
treeCellOptionalTreeCellSlotConfig
headerOptionalTaskListHeaderSlotConfig
TypeScript declaration
/** Slots for the task-list pane. Delivered by prop-drilling (see `<Gantt taskList>`). */
export declare interface GanttTaskListSlots {
    treeCell?: TreeCellSlotConfig;
    header?: TaskListHeaderSlotConfig;
}

Slots for the timeline bars and their handles. Delivered via context.

GanttBarsSlots documented properties
PropertyType & description
baselineOptionalBaselineSlotConfig
taskBarOptionalTaskBarSlotConfig
projectBarOptionalProjectBarSlotConfig
milestoneBarOptionalMilestoneBarSlotConfig
barProgressOptionalBarProgressSlotConfig
barProgressResizeHandleOptionalBarProgressResizeHandleSlotConfig
taskResizerOptionalTaskResizerSlotConfig
connectorHandlesOptionalConnectorHandlesSlotConfig
tooltipOptionalBarTooltipSlotConfig

One slot for all three bar types, rendered by `DraggableBar` so it is scoped to the bar's own hover. Empty by default: no tooltip is rendered and the bar keeps its native `title`. Note it is lost if `slots.root` is replaced, since `DraggableBar` is only the default root (ADR-022).

TypeScript declaration
/** Slots for the timeline bars and their handles. Delivered via context. */
export declare interface GanttBarsSlots {
    baseline?: BaselineSlotConfig;
    taskBar?: TaskBarSlotConfig;
    projectBar?: ProjectBarSlotConfig;
    milestoneBar?: MilestoneBarSlotConfig;
    barProgress?: BarProgressSlotConfig;
    barProgressResizeHandle?: BarProgressResizeHandleSlotConfig;
    taskResizer?: TaskResizerSlotConfig;
    connectorHandles?: ConnectorHandlesSlotConfig;
    /**
     * One slot for all three bar types, rendered by `DraggableBar` so it is
     * scoped to the bar's own hover. Empty by default: no tooltip is rendered and
     * the bar keeps its native `title`. Note it is lost if `slots.root` is
     * replaced, since `DraggableBar` is only the default root (ADR-022).
     */
    tooltip?: BarTooltipSlotConfig;
}

Slots for dependency links. Delivered via context.

GanttDependenciesSlots documented properties
PropertyType & description
linksOptionalDependencyLinksSlotConfig
previewOptionalDependencyPreviewSlotConfig
TypeScript declaration
/** Slots for dependency links. Delivered via context. */
export declare interface GanttDependenciesSlots {
    links?: DependencyLinksSlotConfig;
    preview?: DependencyPreviewSlotConfig;
}

Slots for the calendar/grid timeline chrome. Delivered via context.

GanttTimelineSlots documented properties
PropertyType & description
markerOptionalMarkerSlotConfig
calendarRowOptionalCalendarRowSlotConfig
gridColumnOptionalGridColumnsSlotConfig
gridOptionalGridSlotConfig
gridResizeHandleOptionalGridResizeHandleSlotConfig
TypeScript declaration
/** Slots for the calendar/grid timeline chrome. Delivered via context. */
export declare interface GanttTimelineSlots {
    marker?: MarkerSlotConfig;
    calendarRow?: CalendarRowSlotConfig;
    gridColumn?: GridColumnsSlotConfig;
    grid?: GridSlotConfig;
    gridResizeHandle?: GridResizeHandleSlotConfig;
}

Convenience shape for a component's public `{ slots, slotProps }` config prop.

SlotConfig documented properties
PropertyType & description
slotsOptionalSlots
slotPropsOptionalSlotProps
TypeScript declaration
/** Convenience shape for a component's public `{ slots, slotProps }` config prop. */
export declare interface SlotConfig<Slots, SlotProps> {
    slots?: Slots;
    slotProps?: SlotProps;
}

A consumer-supplied `slotProps` value for a single slot: either a props object, or a function of the component's `ownerState` returning props. `P` is the target element's prop type. Per-slot we pass the native element props (e.g. `ComponentProps<"button">`) so consumers get `className` / `onClick` / aria / `data-*` autocomplete. If a consumer replaces the element with a custom component via `slots`, the props stay loosely typed against the native shape (MUI's default).

/**
 * A consumer-supplied `slotProps` value for a single slot: either a props object,
 * or a function of the component's `ownerState` returning props.
 *
 * `P` is the target element's prop type. Per-slot we pass the native element props
 * (e.g. `ComponentProps<"button">`) so consumers get `className` / `onClick` / aria /
 * `data-*` autocomplete. If a consumer replaces the element with a custom component
 * via `slots`, the props stay loosely typed against the native shape (MUI's default).
 */
export declare type SlotPropsInput<P, OwnerState> = Partial<P> | ((ownerState: OwnerState) => Partial<P>);

Merge library-owned internal props with a consumer's `slotProps` for one slot. - `className`: `clsx(internal, external)` — both apply, the consumer's comes last. - `style`: shallow-merged, the consumer wins per key. - all other props: the consumer overrides the internal value (MUI semantics — e.g. passing `onClick` replaces the default handler; this is the consumer's responsibility to preserve behavior).

/**
 * Merge library-owned internal props with a consumer's `slotProps` for one slot.
 *
 * - `className`: `clsx(internal, external)` — both apply, the consumer's comes last.
 * - `style`: shallow-merged, the consumer wins per key.
 * - all other props: the consumer overrides the internal value (MUI semantics — e.g.
 *   passing `onClick` replaces the default handler; this is the consumer's
 *   responsibility to preserve behavior).
 */
export declare function mergeSlotProps<Props extends {
    className?: string;
    style?: CSSProperties;
}, OwnerState>(internalProps: Props, slotProps: SlotPropsInput<Props, OwnerState> | undefined, ownerState: OwnerState): Props;

State passed to the function form of each BarProgress slotProps.

BarProgressOwnerState documented properties
PropertyType & description
progressRequirednumber
widthRequirednumber
heightRequirednumber
TypeScript declaration
/** State passed to the function form of each BarProgress slotProps. */
export declare interface BarProgressOwnerState {
    progress: number;
    width: number;
    height: number;
}

State passed to the function form of the BarProgressResizeHandle slotProps.

BarProgressResizeHandleOwnerState documented properties
PropertyType & description
widthRequirednumber
parentWidthRequirednumber
TypeScript declaration
/** State passed to the function form of the BarProgressResizeHandle slotProps. */
export declare interface BarProgressResizeHandleOwnerState {
    width: number;
    parentWidth: number;
}
export declare type BarProgressResizeHandleSlotConfig = SlotConfig<BarProgressResizeHandleSlots, BarProgressResizeHandleSlotProps>;
BarProgressResizeHandleSlotProps documented properties
PropertyType & description
rootOptionalSlotPropsInput<ComponentProps<"div">, BarProgressResizeHandleOwnerState>
TypeScript declaration
export declare interface BarProgressResizeHandleSlotProps {
    root?: SlotPropsInput<ComponentProps<"div">, BarProgressResizeHandleOwnerState>;
}
BarProgressResizeHandleSlots documented properties
PropertyType & description
rootOptionalElementType

The progress resize handle element. Default: `"div"`.

TypeScript declaration
export declare interface BarProgressResizeHandleSlots {
    /** The progress resize handle element. Default: `"div"`. */
    root?: ElementType;
}

Slot config for the bar progress fill.

/** Slot config for the bar progress fill. */
export declare type BarProgressSlotConfig = SlotConfig<BarProgressSlots, BarProgressSlotProps>;
BarProgressSlotProps documented properties
PropertyType & description
rootOptionalSlotPropsInput<ComponentProps<"div">, BarProgressOwnerState>
TypeScript declaration
export declare interface BarProgressSlotProps {
    root?: SlotPropsInput<ComponentProps<"div">, BarProgressOwnerState>;
}
BarProgressSlots documented properties
PropertyType & description
rootOptionalElementType

The progress fill element. Default: `"div"`.

TypeScript declaration
export declare interface BarProgressSlots {
    /** The progress fill element. Default: `"div"`. */
    root?: ElementType;
}

State passed to the function form of the tooltip slotProps, and to the slot component itself. `displayEnd` is resolved by `Row` rather than left to the consumer because `task.endDate` is an *exclusive* instant (ADR-014): a Mon–Fri task stores Saturday midnight, so rendering it raw reads as ending on Saturday. Handing over the already-inclusive date is what stops every tooltip from reintroducing that bug.

BarTooltipOwnerState documented properties
PropertyType & description
taskRequiredGanttTask
progressRequirednumber

Resolved progress, override-aware during a drag — not `task.progress`.

displayEndRequiredDate | undefined

Inclusive, user-facing end date. `undefined` for an instant (a milestone).

childrenOptionalReactNode

The bar itself. The slot is a *wrapper*: it has to render this, and has to decide for itself when to show a popup beside it — there is no `open` prop, because the chart holds no open state (ADR-022). Use `BarTooltipRoot` + `BarTooltipTrigger` for the built-in hover behaviour, or a third-party tooltip's own root and trigger.

TypeScript declaration
/**
 * State passed to the function form of the tooltip slotProps, and to the slot
 * component itself.
 *
 * `displayEnd` is resolved by `Row` rather than left to the consumer because
 * `task.endDate` is an *exclusive* instant (ADR-014): a Mon–Fri task stores
 * Saturday midnight, so rendering it raw reads as ending on Saturday. Handing
 * over the already-inclusive date is what stops every tooltip from reintroducing
 * that bug.
 */
export declare interface BarTooltipOwnerState {
    task: GanttTask;
    /** Resolved progress, override-aware during a drag — not `task.progress`. */
    progress: number;
    /** Inclusive, user-facing end date. `undefined` for an instant (a milestone). */
    displayEnd: Date | undefined;
    /**
     * The bar itself. The slot is a *wrapper*: it has to render this, and has to
     * decide for itself when to show a popup beside it — there is no `open` prop,
     * because the chart holds no open state (ADR-022). Use `BarTooltipRoot` +
     * `BarTooltipTrigger` for the built-in hover behaviour, or a third-party
     * tooltip's own root and trigger.
     */
    children?: ReactNode;
}

Slot config for the bar tooltip.

/** Slot config for the bar tooltip. */
export declare type BarTooltipSlotConfig = SlotConfig<BarTooltipSlots, BarTooltipSlotProps>;
BarTooltipSlotProps documented properties
PropertyType & description
tooltipOptionalSlotPropsInput<ComponentProps<"div">, BarTooltipOwnerState>
TypeScript declaration
export declare interface BarTooltipSlotProps {
    tooltip?: SlotPropsInput<ComponentProps<"div">, BarTooltipOwnerState>;
}
BarTooltipSlots documented properties
PropertyType & description
tooltipOptionalElementType

The tooltip. Default: none — nothing is rendered and the bar keeps its native `title`. Pass `GanttBarTooltip` for the built-in one, or any component accepting BarTooltipProps.

TypeScript declaration
export declare interface BarTooltipSlots {
    /**
     * The tooltip. Default: none — nothing is rendered and the bar keeps its
     * native `title`. Pass `GanttBarTooltip` for the built-in one, or any component
     * accepting {@link BarTooltipProps}.
     */
    tooltip?: ElementType;
}
BaselineOwnerState documented properties
PropertyType & description
taskRequiredGanttTask
baselineRequiredGanttBaseline
indexRequirednumber
leftRequirednumber
widthRequirednumber
displayEndOptionalDate
TypeScript declaration
export declare interface BaselineOwnerState {
    task: GanttTask;
    baseline: GanttBaseline;
    index: number;
    left: number;
    width: number;
    displayEnd?: Date;
}
export declare type BaselineSlotConfig = SlotConfig<BaselineSlots, BaselineSlotProps>;
BaselineSlotProps documented properties
PropertyType & description
rootOptionalSlotPropsInput<ComponentProps<"div">, BaselineOwnerState>
TypeScript declaration
export declare interface BaselineSlotProps {
    root?: SlotPropsInput<ComponentProps<"div">, BaselineOwnerState>;
}
BaselineSlots documented properties
PropertyType & description
rootOptionalElementType

Visual root.

tooltipOptionalElementType

Optional wrapper for a custom tooltip; receives the baseline data and root as `children`.

TypeScript declaration
export declare interface BaselineSlots {
    /** Visual root. */
    root?: ElementType;
    /** Optional wrapper for a custom tooltip; receives the baseline data and root as `children`. */
    tooltip?: ElementType;
}
BaselineTooltipProps documented properties
PropertyType & description
taskRequiredGanttTask
baselineRequiredGanttBaseline
indexRequirednumber
leftRequirednumber
widthRequirednumber
displayEndOptionalDate
childrenRequiredReactNode
TypeScript declaration
export declare interface BaselineTooltipProps extends BaselineOwnerState {
    children: ReactNode;
}

Bounds

Type

Axis-aligned pixel bounds.

Bounds documented properties
PropertyType & description
minXRequirednumber
minYRequirednumber
maxXRequirednumber
maxYRequirednumber
TypeScript declaration
/** Axis-aligned pixel bounds. */
export declare interface Bounds {
    minX: number;
    minY: number;
    maxX: number;
    maxY: number;
}

State passed to the function form of the CalendarRow `cell` slotProps (per group).

CalendarCellOwnerState documented properties
PropertyType & description
scaleRequiredScale
dateRequiredDate

Start date of the group this cell represents.

startIndexRequirednumber

Index of the group's first date column.

countRequirednumber

Number of date columns the group spans.

isNonWorkingRequiredboolean

Whether the calendar excludes this cell from working time. Prefer this over CalendarCellOwnerState.isWeekend — it also covers holidays.

nonWorkingReasonOptionalNonWorkingReason

Why the cell is non-working, for styling weekends and holidays apart.

isWeekendRequiredboolean
colWidthRequirednumber
TypeScript declaration
/** State passed to the function form of the CalendarRow `cell` slotProps (per group). */
export declare interface CalendarCellOwnerState {
    scale: Scale;
    /** Start date of the group this cell represents. */
    date: Date;
    /** Index of the group's first date column. */
    startIndex: number;
    /** Number of date columns the group spans. */
    count: number;
    /**
     * Whether the calendar excludes this cell from working time. Prefer this over
     * {@link CalendarCellOwnerState.isWeekend} — it also covers holidays.
     */
    isNonWorking: boolean;
    /** Why the cell is non-working, for styling weekends and holidays apart. */
    nonWorkingReason?: NonWorkingReason;
    /**
     * @deprecated Use {@link CalendarCellOwnerState.isNonWorking}. Retained as an
     * alias so existing slot code keeps working.
     */
    isWeekend: boolean;
    colWidth: number;
}

State passed to the function form of the CalendarRow `row` slotProps.

CalendarRowOwnerState documented properties
PropertyType & description
scaleRequiredScale
colWidthRequirednumber
rowHeightRequirednumber
highlightWeekendsRequiredboolean
TypeScript declaration
/** State passed to the function form of the CalendarRow `row` slotProps. */
export declare interface CalendarRowOwnerState {
    scale: Scale;
    colWidth: number;
    rowHeight: number;
    highlightWeekends: boolean;
}

Slot config for a calendar (header) row. Pass via the calendar's slot props. NOTE: pass a referentially stable / memoized object so downstream memoization is not defeated by a fresh object each render.

/**
 * Slot config for a calendar (header) row. Pass via the calendar's slot props.
 *
 * NOTE: pass a referentially stable / memoized object so downstream memoization
 * is not defeated by a fresh object each render.
 */
export declare type CalendarRowSlotConfig = SlotConfig<CalendarRowSlots, CalendarRowSlotProps>;
CalendarRowSlotProps documented properties
PropertyType & description
rowOptionalSlotPropsInput<ComponentProps<"div">, CalendarRowOwnerState>
cellOptionalSlotPropsInput<ComponentProps<"div">, CalendarCellOwnerState>
TypeScript declaration
export declare interface CalendarRowSlotProps {
    row?: SlotPropsInput<ComponentProps<"div">, CalendarRowOwnerState>;
    cell?: SlotPropsInput<ComponentProps<"div">, CalendarCellOwnerState>;
}
CalendarRowSlots documented properties
PropertyType & description
rowOptionalElementType

The row container. Default: `"div"`.

cellOptionalElementType

A per-group header cell. Default: `"div"`.

TypeScript declaration
export declare interface CalendarRowSlots {
    /** The row container. Default: `"div"`. */
    row?: ElementType;
    /** A per-group header cell. Default: `"div"`. */
    cell?: ElementType;
}

State passed to the function form of each ConnectorHandles slotProps.

ConnectorHandlesOwnerState documented properties
PropertyType & description
taskIdRequiredId
barLeftRequirednumber
barWidthRequirednumber
barCenterYRequirednumber
showRequiredboolean
isDraggingRequiredboolean
TypeScript declaration
/** State passed to the function form of each ConnectorHandles slotProps. */
export declare interface ConnectorHandlesOwnerState {
    taskId: Id;
    barLeft: number;
    barWidth: number;
    barCenterY: number;
    show: boolean;
    isDragging: boolean;
}
export declare type ConnectorHandlesSlotConfig = SlotConfig<ConnectorHandlesSlots, ConnectorHandlesSlotProps>;
ConnectorHandlesSlotProps documented properties
PropertyType & description
startHandleOptionalSlotPropsInput<ComponentProps<"div">, ConnectorHandlesOwnerState>
endHandleOptionalSlotPropsInput<ComponentProps<"div">, ConnectorHandlesOwnerState>
TypeScript declaration
export declare interface ConnectorHandlesSlotProps {
    startHandle?: SlotPropsInput<ComponentProps<"div">, ConnectorHandlesOwnerState>;
    endHandle?: SlotPropsInput<ComponentProps<"div">, ConnectorHandlesOwnerState>;
}
ConnectorHandlesSlots documented properties
PropertyType & description
startHandleOptionalElementType

The left/start dependency-connector handle. Default: `"div"`.

endHandleOptionalElementType

The right/end dependency-connector handle. Default: `"div"`.

TypeScript declaration
export declare interface ConnectorHandlesSlots {
    /** The left/start dependency-connector handle. Default: `"div"`. */
    startHandle?: ElementType;
    /** The right/end dependency-connector handle. Default: `"div"`. */
    endHandle?: ElementType;
}

State passed to the `deleteButton` slotProps.

DependencyDeleteButtonOwnerState documented properties
PropertyType & description
dependencyRequiredTaskDependency

The dependency the button will delete when clicked.

TypeScript declaration
/** State passed to the `deleteButton` slotProps. */
export declare interface DependencyDeleteButtonOwnerState {
    /** The dependency the button will delete when clicked. */
    dependency: TaskDependency;
}

State passed to the `lagLabel` slotProps.

DependencyLagLabelOwnerState documented properties
PropertyType & description
linkRequiredDependencyLink

The dependency link being rendered.

isSelectedRequiredboolean

Whether this link is currently selected.

isCriticalRequiredboolean

Whether this link is the binding edge of the critical path (ADR-023).

lagRequirednumber

The lag value in days (non-zero when the label renders).

TypeScript declaration
/** State passed to the `lagLabel` slotProps. */
export declare interface DependencyLagLabelOwnerState extends DependencyLinkOwnerState {
    /** The lag value in days (non-zero when the label renders). */
    lag: number;
}

State shared by the per-link slots (`arrow`).

DependencyLinkOwnerState documented properties
PropertyType & description
linkRequiredDependencyLink

The dependency link being rendered.

isSelectedRequiredboolean

Whether this link is currently selected.

isCriticalRequiredboolean

Whether this link is the binding edge of the critical path (ADR-023).

TypeScript declaration
/** State shared by the per-link slots (`arrow`). */
export declare interface DependencyLinkOwnerState {
    /** The dependency link being rendered. */
    link: DependencyLink;
    /** Whether this link is currently selected. */
    isSelected: boolean;
    /** Whether this link is the binding edge of the critical path (ADR-023). */
    isCritical: boolean;
}

State passed to the function form of the `layer` slotProps.

DependencyLinksLayerOwnerState documented properties
PropertyType & description
widthRequirednumber
heightRequirednumber
linkCountRequirednumber

Number of dependency links currently in the layer.

TypeScript declaration
/** State passed to the function form of the `layer` slotProps. */
export declare interface DependencyLinksLayerOwnerState {
    width: number;
    height: number;
    /** Number of dependency links currently in the layer. */
    linkCount: number;
}

Slot config for the dependency links layer.

/** Slot config for the dependency links layer. */
export declare type DependencyLinksSlotConfig = SlotConfig<DependencyLinksSlots, DependencyLinksSlotProps>;
DependencyLinksSlotProps documented properties
PropertyType & description
layerOptionalSlotPropsInput<ComponentProps<"div">, DependencyLinksLayerOwnerState>
segmentOptionalSlotPropsInput<ComponentProps<"div">, DependencySegmentOwnerState>
arrowOptionalSlotPropsInput<ComponentProps<"div">, DependencyLinkOwnerState>
lagLabelOptionalSlotPropsInput<ComponentProps<"div">, DependencyLagLabelOwnerState>
deleteButtonOptionalSlotPropsInput<ComponentProps<"button">, DependencyDeleteButtonOwnerState>
TypeScript declaration
export declare interface DependencyLinksSlotProps {
    layer?: SlotPropsInput<ComponentProps<"div">, DependencyLinksLayerOwnerState>;
    segment?: SlotPropsInput<ComponentProps<"div">, DependencySegmentOwnerState>;
    arrow?: SlotPropsInput<ComponentProps<"div">, DependencyLinkOwnerState>;
    lagLabel?: SlotPropsInput<ComponentProps<"div">, DependencyLagLabelOwnerState>;
    deleteButton?: SlotPropsInput<ComponentProps<"button">, DependencyDeleteButtonOwnerState>;
}
DependencyLinksSlots documented properties
PropertyType & description
layerOptionalElementType

The absolutely-positioned links layer container. Default: `"div"`.

segmentOptionalElementType

A single visible link segment. Default: `"div"`.

arrowOptionalElementType

The arrowhead at the target end of a link. Default: `"div"`.

lagLabelOptionalElementType

The `+Nd` / `-Nd` lag label. Default: `"div"`.

deleteButtonOptionalElementType

The `×` delete button shown for the selected link. Default: `"button"`.

TypeScript declaration
export declare interface DependencyLinksSlots {
    /** The absolutely-positioned links layer container. Default: `"div"`. */
    layer?: ElementType;
    /** A single visible link segment. Default: `"div"`. */
    segment?: ElementType;
    /** The arrowhead at the target end of a link. Default: `"div"`. */
    arrow?: ElementType;
    /** The `+Nd` / `-Nd` lag label. Default: `"div"`. */
    lagLabel?: ElementType;
    /** The `×` delete button shown for the selected link. Default: `"button"`. */
    deleteButton?: ElementType;
}

State passed to the function form of the `root` slotProps.

DependencyPreviewOwnerState documented properties
PropertyType & description
dragRequiredDependencyDragState

The in-progress dependency drag.

lengthRequirednumber

Horizontal length of the rubber-band, in pixels.

angleRequirednumber

Rotation of the rubber-band, in degrees.

TypeScript declaration
/** State passed to the function form of the `root` slotProps. */
export declare interface DependencyPreviewOwnerState {
    /** The in-progress dependency drag. */
    drag: DependencyDragState;
    /** Horizontal length of the rubber-band, in pixels. */
    length: number;
    /** Rotation of the rubber-band, in degrees. */
    angle: number;
}
Supporting types

These types appear in this signature but are not separate package exports.

declare interface DependencyDragState {
    fromTaskId: Id;
    handle: ConnectorHandle;
    startX: number;
    startY: number;
    currentX: number;
    currentY: number;
}

declare type ConnectorHandle = "start" | "end";

Slot config for the dependency drag preview.

/** Slot config for the dependency drag preview. */
export declare type DependencyPreviewSlotConfig = SlotConfig<DependencyPreviewSlots, DependencyPreviewSlotProps>;
DependencyPreviewSlotProps documented properties
PropertyType & description
rootOptionalSlotPropsInput<ComponentProps<"div">, DependencyPreviewOwnerState>
TypeScript declaration
export declare interface DependencyPreviewSlotProps {
    root?: SlotPropsInput<ComponentProps<"div">, DependencyPreviewOwnerState>;
}
DependencyPreviewSlots documented properties
PropertyType & description
rootOptionalElementType

The rubber-band preview line. Default: `"div"`.

TypeScript declaration
export declare interface DependencyPreviewSlots {
    /** The rubber-band preview line. Default: `"div"`. */
    root?: ElementType;
}

State passed to the `segment` slotProps, per visible segment of a link.

DependencySegmentOwnerState documented properties
PropertyType & description
linkRequiredDependencyLink

The dependency link being rendered.

isSelectedRequiredboolean

Whether this link is currently selected.

isCriticalRequiredboolean

Whether this link is the binding edge of the critical path (ADR-023).

fromRequiredPoint

Start point of this segment.

toRequiredPoint

End point of this segment.

indexRequirednumber

Index of this segment within the link's polyline.

TypeScript declaration
/** State passed to the `segment` slotProps, per visible segment of a link. */
export declare interface DependencySegmentOwnerState extends DependencyLinkOwnerState {
    /** Start point of this segment. */
    from: Point;
    /** End point of this segment. */
    to: Point;
    /** Index of this segment within the link's polyline. */
    index: number;
}

State passed to the function form of the GridColumns `column` slotProps (per day).

GridColumnOwnerState documented properties
PropertyType & description
dateRequiredDate

The day this column paints.

indexRequirednumber

Absolute date-column index.

isNonWorkingRequiredboolean

Whether the calendar excludes this column from working time. Prefer this over GridColumnOwnerState.isWeekend — it also covers holidays and, at hour scale, off-hours.

nonWorkingReasonOptionalNonWorkingReason

Why the column is non-working, for styling weekends and holidays apart.

isWeekendRequiredboolean
colWidthRequirednumber
bodyHeightRequirednumber
TypeScript declaration
/** State passed to the function form of the GridColumns `column` slotProps (per day). */
export declare interface GridColumnOwnerState {
    /** The day this column paints. */
    date: Date;
    /** Absolute date-column index. */
    index: number;
    /**
     * Whether the calendar excludes this column from working time. Prefer this over
     * {@link GridColumnOwnerState.isWeekend} — it also covers holidays and, at hour
     * scale, off-hours.
     */
    isNonWorking: boolean;
    /** Why the column is non-working, for styling weekends and holidays apart. */
    nonWorkingReason?: NonWorkingReason;
    /**
     * @deprecated Use {@link GridColumnOwnerState.isNonWorking}. Retained as an
     * alias so existing slot code keeps working; it is now true for any
     * non-working column, not only Saturday and Sunday.
     */
    isWeekend: boolean;
    colWidth: number;
    bodyHeight: number;
}

Slot config for the grid background columns. Pass via the grid's slot props. NOTE: pass a referentially stable / memoized object so downstream memoization is not defeated by a fresh object each render.

/**
 * Slot config for the grid background columns. Pass via the grid's slot props.
 *
 * NOTE: pass a referentially stable / memoized object so downstream memoization
 * is not defeated by a fresh object each render.
 */
export declare type GridColumnsSlotConfig = SlotConfig<GridColumnsSlots, GridColumnsSlotProps>;
GridColumnsSlotProps documented properties
PropertyType & description
columnOptionalSlotPropsInput<ComponentProps<"div">, GridColumnOwnerState>
TypeScript declaration
export declare interface GridColumnsSlotProps {
    column?: SlotPropsInput<ComponentProps<"div">, GridColumnOwnerState>;
}
GridColumnsSlots documented properties
PropertyType & description
columnOptionalElementType

A per-day background column. Default: `"div"`.

TypeScript declaration
export declare interface GridColumnsSlots {
    /** A per-day background column. Default: `"div"`. */
    column?: ElementType;
}

State passed to the function form of the Grid slotProps.

GridOwnerState documented properties
PropertyType & description
totalWidthRequirednumber

Total content width in px (`dates.length * colWidth`).

bodyHeightRequirednumber

Total body height in px (`visibleTasks.length * rowHeight`).

heightRequirednumber | undefined

Fixed grid-wrapper height when configured, else `undefined` (auto).

TypeScript declaration
/** State passed to the function form of the Grid slotProps. */
export declare interface GridOwnerState {
    /** Total content width in px (`dates.length * colWidth`). */
    totalWidth: number;
    /** Total body height in px (`visibleTasks.length * rowHeight`). */
    bodyHeight: number;
    /** Fixed grid-wrapper height when configured, else `undefined` (auto). */
    height: number | undefined;
}

State passed to the function form of the GridResizeHandle slotProps.

GridResizeHandleOwnerState documented properties
PropertyType & description
isResizingRequiredboolean

Whether a resize drag is currently in progress.

TypeScript declaration
/** State passed to the function form of the GridResizeHandle slotProps. */
export declare interface GridResizeHandleOwnerState {
    /** Whether a resize drag is currently in progress. */
    isResizing: boolean;
}
export declare type GridResizeHandleSlotConfig = SlotConfig<GridResizeHandleSlots, GridResizeHandleSlotProps>;
GridResizeHandleSlotProps documented properties
PropertyType & description
rootOptionalSlotPropsInput<ComponentProps<"div">, GridResizeHandleOwnerState>
TypeScript declaration
export declare interface GridResizeHandleSlotProps {
    root?: SlotPropsInput<ComponentProps<"div">, GridResizeHandleOwnerState>;
}
GridResizeHandleSlots documented properties
PropertyType & description
rootOptionalElementType

The pane splitter element. Default: `"div"`.

TypeScript declaration
export declare interface GridResizeHandleSlots {
    /** The pane splitter element. Default: `"div"`. */
    root?: ElementType;
}

Slot config for the Gantt grid. Threaded from `<Gantt>` in a later pass. NOTE: pass a referentially stable / memoized object so downstream memoization is not defeated by a fresh object each render.

/**
 * Slot config for the Gantt grid. Threaded from `<Gantt>` in a later pass.
 *
 * NOTE: pass a referentially stable / memoized object so downstream memoization
 * is not defeated by a fresh object each render.
 */
export declare type GridSlotConfig = SlotConfig<GridSlots, GridSlotProps>;
GridSlotProps documented properties
PropertyType & description
rootOptionalSlotPropsInput<ComponentProps<"div">, GridOwnerState>
bodyOptionalSlotPropsInput<ComponentProps<"div">, GridOwnerState>
TypeScript declaration
export declare interface GridSlotProps {
    root?: SlotPropsInput<ComponentProps<"div">, GridOwnerState>;
    body?: SlotPropsInput<ComponentProps<"div">, GridOwnerState>;
}
GridSlots documented properties
PropertyType & description
rootOptionalElementType

The scroll wrapper (`styles.gridWrapper`). Default: `"div"`.

bodyOptionalElementType

The scrollable body layer (`styles.body`). Default: `"div"`.

TypeScript declaration
export declare interface GridSlots {
    /** The scroll wrapper (`styles.gridWrapper`). Default: `"div"`. */
    root?: ElementType;
    /** The scrollable body layer (`styles.body`). Default: `"div"`. */
    body?: ElementType;
}
MarkerOwnerState documented properties
PropertyType & description
dateRequiredDate
titleOptionalstring
visibleTopRequirednumber
TypeScript declaration
export declare interface MarkerOwnerState {
    date: Date;
    title?: string;
    visibleTop: number;
}
export declare type MarkerSlotConfig = SlotConfig<MarkerSlots, MarkerSlotProps>;
MarkerSlotProps documented properties
PropertyType & description
rootOptionalSlotPropsInput<ComponentProps<"div">, MarkerOwnerState>
lineOptionalSlotPropsInput<ComponentProps<"div">, MarkerOwnerState>
labelOptionalSlotPropsInput<ComponentProps<"span">, MarkerOwnerState>
TypeScript declaration
export declare interface MarkerSlotProps {
    root?: SlotPropsInput<ComponentProps<"div">, MarkerOwnerState>;
    line?: SlotPropsInput<ComponentProps<"div">, MarkerOwnerState>;
    label?: SlotPropsInput<ComponentProps<"span">, MarkerOwnerState>;
}
MarkerSlots documented properties
PropertyType & description
rootOptionalElementType
lineOptionalElementType
labelOptionalElementType
TypeScript declaration
export declare interface MarkerSlots {
    root?: ElementType;
    line?: ElementType;
    label?: ElementType;
}
MilestoneBarOwnerState documented properties
PropertyType & description
sizeRequirednumber
titleRequiredstring
isCriticalRequiredboolean

Whether this bar is on the critical path (ADR-023).

TypeScript declaration
export declare interface MilestoneBarOwnerState {
    size: number;
    title: string;
    /** Whether this bar is on the critical path (ADR-023). */
    isCritical: boolean;
}
export declare type MilestoneBarSlotConfig = SlotConfig<MilestoneBarSlots, MilestoneBarSlotProps>;
MilestoneBarSlotProps documented properties
PropertyType & description
rootOptionalSlotPropsInput<ComponentProps<"div">, MilestoneBarOwnerState>
shapeOptionalSlotPropsInput<ComponentProps<"div">, MilestoneBarOwnerState>
TypeScript declaration
export declare interface MilestoneBarSlotProps {
    root?: SlotPropsInput<ComponentProps<"div">, MilestoneBarOwnerState>;
    shape?: SlotPropsInput<ComponentProps<"div">, MilestoneBarOwnerState>;
}
MilestoneBarSlots documented properties
PropertyType & description
rootOptionalElementType

The draggable bar wrapper. Default: `DraggableBar`.

shapeOptionalElementType

The diamond shape. Default: `"div"`.

TypeScript declaration
export declare interface MilestoneBarSlots {
    /** The draggable bar wrapper. Default: `DraggableBar`. */
    root?: ElementType;
    /** The diamond shape. Default: `"div"`. */
    shape?: ElementType;
}

Point

Type
Point documented properties
PropertyType & description
xRequirednumber
yRequirednumber
TypeScript declaration
export declare interface Point {
    x: number;
    y: number;
}

State passed to the function form of each ProjectBar slotProps.

ProjectBarOwnerState documented properties
PropertyType & description
widthRequirednumber
heightRequirednumber
progressRequirednumber
titleRequiredstring
isCriticalRequiredboolean

Whether this bar is on the critical path (ADR-023).

TypeScript declaration
/** State passed to the function form of each ProjectBar slotProps. */
export declare interface ProjectBarOwnerState {
    width: number;
    height: number;
    progress: number;
    title: string;
    /** Whether this bar is on the critical path (ADR-023). */
    isCritical: boolean;
}

Slot config for the project bar.

/** Slot config for the project bar. */
export declare type ProjectBarSlotConfig = SlotConfig<ProjectBarSlots, ProjectBarSlotProps>;
ProjectBarSlotProps documented properties
PropertyType & description
rootOptionalSlotPropsInput<ComponentProps<"div">, ProjectBarOwnerState>
innerOptionalSlotPropsInput<ComponentProps<"div">, ProjectBarOwnerState>
labelOptionalSlotPropsInput<ComponentProps<"div">, ProjectBarOwnerState>
TypeScript declaration
export declare interface ProjectBarSlotProps {
    root?: SlotPropsInput<ComponentProps<"div">, ProjectBarOwnerState>;
    inner?: SlotPropsInput<ComponentProps<"div">, ProjectBarOwnerState>;
    label?: SlotPropsInput<ComponentProps<"div">, ProjectBarOwnerState>;
}
ProjectBarSlots documented properties
PropertyType & description
rootOptionalElementType

The draggable bar wrapper. Default: `DraggableBar`.

innerOptionalElementType

The inner layout wrapper holding progress/label. Default: `"div"`.

labelOptionalElementType

The title label. Default: `"div"`.

TypeScript declaration
export declare interface ProjectBarSlots {
    /** The draggable bar wrapper. Default: `DraggableBar`. */
    root?: ElementType;
    /** The inner layout wrapper holding progress/label. Default: `"div"`. */
    inner?: ElementType;
    /** The title label. Default: `"div"`. */
    label?: ElementType;
}

State passed to the function form of each TaskBar slotProps.

TaskBarOwnerState documented properties
PropertyType & description
widthRequirednumber
heightRequirednumber
progressRequirednumber
titleRequiredstring
isCriticalRequiredboolean

Whether this bar is on the critical path (ADR-023).

TypeScript declaration
/** State passed to the function form of each TaskBar slotProps. */
export declare interface TaskBarOwnerState {
    width: number;
    height: number;
    progress: number;
    title: string;
    /** Whether this bar is on the critical path (ADR-023). */
    isCritical: boolean;
}

Slot config for the task bar.

/** Slot config for the task bar. */
export declare type TaskBarSlotConfig = SlotConfig<TaskBarSlots, TaskBarSlotProps>;
TaskBarSlotProps documented properties
PropertyType & description
rootOptionalSlotPropsInput<ComponentProps<"div">, TaskBarOwnerState>
innerOptionalSlotPropsInput<ComponentProps<"div">, TaskBarOwnerState>
labelOptionalSlotPropsInput<ComponentProps<"div">, TaskBarOwnerState>
TypeScript declaration
export declare interface TaskBarSlotProps {
    root?: SlotPropsInput<ComponentProps<"div">, TaskBarOwnerState>;
    inner?: SlotPropsInput<ComponentProps<"div">, TaskBarOwnerState>;
    label?: SlotPropsInput<ComponentProps<"div">, TaskBarOwnerState>;
}
TaskBarSlots documented properties
PropertyType & description
rootOptionalElementType

The draggable bar wrapper. Default: `DraggableBar`.

innerOptionalElementType

The inner layout wrapper holding progress/label/resizer. Default: `"div"`.

labelOptionalElementType

The title label. Default: `"div"`.

TypeScript declaration
export declare interface TaskBarSlots {
    /** The draggable bar wrapper. Default: `DraggableBar`. */
    root?: ElementType;
    /** The inner layout wrapper holding progress/label/resizer. Default: `"div"`. */
    inner?: ElementType;
    /** The title label. Default: `"div"`. */
    label?: ElementType;
}

State passed to the function form of the per-column slotProps.

TaskListHeaderCellOwnerState documented properties
PropertyType & description
columnRequiredColumnDef
indexRequirednumber
TypeScript declaration
/** State passed to the function form of the per-column slotProps. */
export declare interface TaskListHeaderCellOwnerState {
    column: ColumnDef;
    index: number;
}

State passed to the function form of the header (container) slotProps.

TaskListHeaderOwnerState documented properties
PropertyType & description
columnsRequiredColumnDef[]
headerHeightRequirednumber
TypeScript declaration
/** State passed to the function form of the header (container) slotProps. */
export declare interface TaskListHeaderOwnerState {
    columns: ColumnDef[];
    headerHeight: number;
}
export declare type TaskListHeaderSlotConfig = SlotConfig<TaskListHeaderSlots, TaskListHeaderSlotProps>;
TaskListHeaderSlotProps documented properties
PropertyType & description
headerOptionalSlotPropsInput<ComponentProps<"div">, TaskListHeaderOwnerState>
headerCellOptionalSlotPropsInput<ComponentProps<"div">, TaskListHeaderCellOwnerState>
columnResizeHandleOptionalSlotPropsInput<ComponentProps<"div">, TaskListHeaderCellOwnerState>
TypeScript declaration
export declare interface TaskListHeaderSlotProps {
    header?: SlotPropsInput<ComponentProps<"div">, TaskListHeaderOwnerState>;
    headerCell?: SlotPropsInput<ComponentProps<"div">, TaskListHeaderCellOwnerState>;
    columnResizeHandle?: SlotPropsInput<ComponentProps<"div">, TaskListHeaderCellOwnerState>;
}
TaskListHeaderSlots documented properties
PropertyType & description
headerOptionalElementType

The header row container. Default: `"div"`.

headerCellOptionalElementType

A per-column header cell. Default: `"div"`.

columnResizeHandleOptionalElementType

The per-column resize handle (divider). Default: `"div"`.

TypeScript declaration
export declare interface TaskListHeaderSlots {
    /** The header row container. Default: `"div"`. */
    header?: ElementType;
    /** A per-column header cell. Default: `"div"`. */
    headerCell?: ElementType;
    /** The per-column resize handle (divider). Default: `"div"`. */
    columnResizeHandle?: ElementType;
}

State passed to the function form of each TaskResizer slotProps.

TaskResizerOwnerState documented properties
PropertyType & description
widthRequirednumber
leftRequirednumber
TypeScript declaration
/** State passed to the function form of each TaskResizer slotProps. */
export declare interface TaskResizerOwnerState {
    width: number;
    left: number;
}
export declare type TaskResizerSlotConfig = SlotConfig<TaskResizerSlots, TaskResizerSlotProps>;
TaskResizerSlotProps documented properties
PropertyType & description
startHandleOptionalSlotPropsInput<ComponentProps<"button">, TaskResizerOwnerState>
endHandleOptionalSlotPropsInput<ComponentProps<"button">, TaskResizerOwnerState>
TypeScript declaration
export declare interface TaskResizerSlotProps {
    startHandle?: SlotPropsInput<ComponentProps<"button">, TaskResizerOwnerState>;
    endHandle?: SlotPropsInput<ComponentProps<"button">, TaskResizerOwnerState>;
}
TaskResizerSlots documented properties
PropertyType & description
startHandleOptionalElementType

The left/start resize button. Default: `"button"`.

endHandleOptionalElementType

The right/end resize button. Default: `"button"`.

TypeScript declaration
export declare interface TaskResizerSlots {
    /** The left/start resize button. Default: `"button"`. */
    startHandle?: ElementType;
    /** The right/end resize button. Default: `"button"`. */
    endHandle?: ElementType;
}

State passed to the function form of each TreeCell slotProps.

TreeCellOwnerState documented properties
PropertyType & description
taskIdRequiredId
depthRequirednumber
isParentRequiredboolean
isExpandedRequiredboolean
TypeScript declaration
/** State passed to the function form of each TreeCell slotProps. */
export declare interface TreeCellOwnerState {
    taskId: Id;
    depth: number;
    isParent: boolean;
    isExpanded: boolean;
}

Slot config for the tree cell. Pass via `<Gantt treeCell={...} />`. NOTE: pass a referentially stable / memoized object — `TaskListRow` is memoized, so a fresh object each render defeats its memo and re-renders every row.

/**
 * Slot config for the tree cell. Pass via `<Gantt treeCell={...} />`.
 *
 * NOTE: pass a referentially stable / memoized object — `TaskListRow` is memoized,
 * so a fresh object each render defeats its memo and re-renders every row.
 */
export declare type TreeCellSlotConfig = SlotConfig<TreeCellSlots, TreeCellSlotProps>;
TreeCellSlotProps documented properties
PropertyType & description
rootOptionalSlotPropsInput<ComponentProps<"span">, TreeCellOwnerState>
expandButtonOptionalSlotPropsInput<ComponentProps<"button">, TreeCellOwnerState>
placeholderOptionalSlotPropsInput<ComponentProps<"span">, TreeCellOwnerState>
TypeScript declaration
export declare interface TreeCellSlotProps {
    root?: SlotPropsInput<ComponentProps<"span">, TreeCellOwnerState>;
    expandButton?: SlotPropsInput<ComponentProps<"button">, TreeCellOwnerState>;
    placeholder?: SlotPropsInput<ComponentProps<"span">, TreeCellOwnerState>;
}
TreeCellSlots documented properties
PropertyType & description
rootOptionalElementType

The `nameContent` wrapper. Default: `"span"`.

expandButtonOptionalElementType

The ▾/▸ expand/collapse toggle. Default: `"button"`.

placeholderOptionalElementType

The spacer rendered for leaf (non-parent) rows. Default: `"span"`.

TypeScript declaration
export declare interface TreeCellSlots {
    /** The `nameContent` wrapper. Default: `"span"`. */
    root?: ElementType;
    /** The ▾/▸ expand/collapse toggle. Default: `"button"`. */
    expandButton?: ElementType;
    /** The spacer rendered for leaf (non-parent) rows. Default: `"span"`. */
    placeholder?: ElementType;
}

Related examples