Skip to content

Support dynamic item height #977

@YousefAslan

Description

@YousefAslan

Problem Description

The current timeline component only supports static item heights, where each item uses a single fixed height value.
This limitation prevents timelines from representing items of varying visual or content size, which reduces flexibility and expressiveness in use cases where item height should differ dynamically.

Proposed Solution

Introduce support for dynamic item sizing, allowing each timeline item to define its own height through a new optional height property. All layout-related calculations — including group height, item positioning, and collision detection — should leverage these per-item height values to ensure proper rendering and stacking.
With dynamic item heights, the existing gap calculation (lineHeight * (1 - itemHeightRatio)) will no longer produce consistent visual spacing, as it assumes a uniform height across all items. To address this, introduce a new timeline-level prop, itemVerticalGap, which defines a fixed vertical spacing between items regardless of their height.

Alternatives Considered

The current implementation does not include built-in support for dynamic item sizing, and no reliable workaround exists without altering core layout logic or breaking existing features.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions