tone: default, success, warning, danger.

  1. Launched

    Rocket v1.4.0 to the moon

  2. Gru approved the plan
  3. Banana shortage

    The fridge was empty

Branched timeline. Give events a branch and the timeline draws lanes side by side, like a git graph. Events without a branch sit on the main lane; the first event of another branch splits off the lane named by forkFrom (the main lane by default), and an event with mergeFrom (one branch id or a list) joins those branches back in, ending them on its row. branches sets the lane order, the first being the main lane, and gives each one a label that is shown beside its first event.

  1. Lair openedmain
  2. Start freeze rayfeature/freeze-ray

    Branched from main

  3. Banana bug reported
  4. Fix banana roundinghotfix/banana-1.4.1
  5. Freeze ray done
  6. Lair upgraded

    Hotfix merged

  7. Freeze ray merged

    Gru approved

Horizontal. orientation="horizontal" runs the events left to right with the branch lanes stacked above them, and scrolls sideways when it does not fit. Everything else, including branches, works the same.

  1. Lair opened
  2. Start freeze rayfeature/freeze-ray

    Branched from main

  3. Banana bug reported
  4. Freeze ray done
  5. Freeze ray merged

    Gru approved

Props

Timeline

  • itemsTimelineItem[]

    Events; tone is default | success | warning | danger. branch puts an event on a lane (default: the main lane), forkFrom names the lane a branch splits off, mergeFrom the branch id(s) that join here. See the TimelineItem table below.

  • orientation'vertical' | 'horizontal'
    Default: 'vertical'

    Top to bottom, or left to right with the branch lanes stacked above the events.

  • branches{ id, label? }[]

    Lane order (the first is the main lane) and a label shown beside the first event of each branch.

  • classNamestring
    Default: ''

    Extra classes for the root element.

TimelineItem

  • keystring | number

    Unique key of the event.

  • titleReactNode

    Headline of the event.

  • descriptionReactNode

    Text under the title.

  • timeReactNode

    When it happened.

  • tone'default' | 'success' | 'warning' | 'danger'
    Default: 'default'

    Color of the marker.

  • branchstring

    The branch (lane) this event sits on. Events without one sit on the main lane.

  • forkFromstring

    On the first event of a branch: the branch it splits off from (default: the main lane).

  • mergeFromstring | string[]

    Branch id(s) that join this event's branch here; each of them ends on this row.