timeline

look

Rows of bars on a day axis: move a bar or pull an edge, by pointer, keys or VoiceOver.

Drawn

Crews
December 2026
1T2W3T4F5S6S7M8T9W10T11F12S13S14M15T16W17T18F19S20S21M22T23W24T25F26S27S28M29T30W31T
St Anne's annexeCrew 3 · fit-out
Fit-out
Riverside Tower ACrew 1
Formwork
Pour
Cure
Riverside Tower BCrew 2
Excavate
Footings
Marlow Street flatsCrew 3 · behind
Brickwork
Inspect
Kingfisher school hallCrew 1 · finished
Roof
Snag list
Quayside car parkCrew 4
Resurface · no permit
Lines
Old Mill conversionunassigned
Pier Road drainageCrew 2
Survey
Dig

The sample

crates/blocks/src/kind/core/timeline.rs:399–434

fn timeline() -> Block {
    let bar = |(id, start, end, label, tone, progress, fixed): &SampleBar| TimeBar {
        id: (*id).into(),
        start: (*start).into(),
        end: (*end).into(),
        label: Some((*label).into()),
        tone: serde_json::from_value(serde_json::Value::from(*tone))
            .ok()
            .filter(|_| !tone.is_empty()),
        progress: *progress,
        fixed: fixed.then_some(true),
        tap: None,
    };
    let tracks = SAMPLE.iter().map(|(id, title, subtitle, bars)| TimeRow {
        id: (*id).into(),
        title: (*title).into(),
        subtitle: Some((*subtitle).into()),
        bars: bars.iter().map(bar).collect(),
        tap: None,
    });
    let off = ["05", "06", "10", "12", "13", "19", "20", "26", "27", "31"].map(|d| format!("2026-12-{d}"));
    let schedule = Gesture {
        action: "schedule".into(),
        name: "bar".into(),
        enabled: None,
    };
    Block::Timeline(Box::new(
        Timeline::new("2026-12-01", "2026-12-31", tracks.collect::<Vec<_>>())
            .id("plan")
            .title("Crews")
            .off(off.to_vec())
            .moves(schedule.clone())
            .stretch(schedule.clone())
            .draw(schedule),
    ))
}
{
  "blocks": [
    {
      "draw": {
        "action": "schedule",
        "name": "bar"
      },
      "fallback": {
        "title": "Crews"
      },
      "from": "2026-12-01",
      "id": "plan",
      "move": {
        "action": "schedule",
        "name": "bar"
      },
      "off": [
        "2026-12-05",
        "2026-12-06",
        "2026-12-10",
        "2026-12-12",
        "2026-12-13",
        "2026-12-19",
        "2026-12-20",
        "2026-12-26",
        "2026-12-27",
        "2026-12-31"
      ],
      "stretch": {
        "action": "schedule",
        "name": "bar"
      },
      "title": "Crews",
      "to": "2026-12-31",
      "tracks": [
        {
          "bars": [
            {
              "end": "2026-12-04",
              "id": "b01",
              "label": "Fit-out",
              "progress": 80,
              "start": "2026-11-23"
            }
          ],
          "id": "j0",
          "subtitle": "Crew 3 · fit-out",
          "title": "St Anne's annexe"
        },
        {
          "bars": [
            {
              "end": "2026-12-04",
              "id": "b11",
              "label": "Formwork",
              "progress": 100,
              "start": "2026-12-01",
              "tone": "ok"
            },
            {
              "end": "2026-12-09",
              "id": "b12",
              "label": "Pour",
              "start": "2026-12-07"
            },
            {
              "end": "2026-12-22",
              "id": "b13",
              "label": "Cure",
              "start": "2026-12-14",
              "tone": "info"
            }
          ],
          "id": "j1",
          "subtitle": "Crew 1",
          "title": "Riverside Tower A"
        },
        {
          "bars": [
            {
              "end": "2026-12-08",
              "id": "b21",
              "label": "Excavate",
              "progress": 60,
              "start": "2026-12-02"
            },
            {
              "end": "2026-12-18",
              "id": "b22",
              "label": "Footings",
              "start": "2026-12-11"
            }
          ],
          "id": "j2",
          "subtitle": "Crew 2",
          "title": "Riverside Tower B"
        },
        {
          "bars": [
            {
              "end": "2026-12-23",
              "id": "b31",
              "label": "Brickwork",
              "progress": 30,
              "start": "2026-12-07",
              "tone": "warn"
            },
            {
              "end": "2026-12-28",
              "id": "b32",
              "label": "Inspect",
              "start": "2026-12-28"
            }
          ],
          "id": "j3",
          "subtitle": "Crew 3 · behind",
          "title": "Marlow Street flats"
        },
        {
          "bars": [
            {
              "end": "2026-12-03",
              "fixed": true,
              "id": "b41",
              "label": "Roof",
              "progress": 100,
              "start": "2026-12-01",
              "tone": "ok"
            },
            {
              "end": "2026-12-08",
              "fixed": true,
              "id": "b42",
              "label": "Snag list",
              "progress": 100,
              "start": "2026-12-07"
            }
          ],
          "id": "j4",
          "subtitle": "Crew 1 · finished",
          "title": "Kingfisher school hall"
        },
        {
          "bars": [
            {
              "end": "2026-12-18",
              "id": "b51",
              "label": "Resurface · no permit",
              "start": "2026-12-15",
              "tone": "bad"
            },
            {
              "end": "2026-12-22",
              "id": "b52",
              "label": "Lines",
              "start": "2026-12-21"
            }
          ],
          "id": "j5",
          "subtitle": "Crew 4",
          "title": "Quayside car park"
        },
        {
          "bars": [],
          "id": "j6",
          "subtitle": "unassigned",
          "title": "Old Mill conversion"
        },
        {
          "bars": [
            {
              "end": "2026-12-23",
              "id": "b71",
              "label": "Survey",
              "start": "2026-12-21"
            },
            {
              "end": "2027-01-08",
              "id": "b72",
              "label": "Dig",
              "start": "2026-12-28",
              "tone": "accent"
            }
          ],
          "id": "j7",
          "subtitle": "Crew 2",
          "title": "Pier Road drainage"
        }
      ],
      "type": "timeline"
    }
  ],
  "fallback": {
    "title": "screen"
  },
  "id": "timeline",
  "type": "screen"
}

Its fallback

What a renderer without timeline draws: a row from the fallback the block carries.
Crews

Style hooks

.b-timelinethe block
[data-block=timeline]every block of the kind
[data-id=plan]this one block
Every page here is a blocks Screen, written by site::page: no hand-written HTML. Source: https://github.com/jirathip-dev/blocks