Branch strip · horizontal
A branched corridor with labels above and below the track.
Preview
Usage
Installation
pnpm dlx shadcn@latest add https://tfl-ts.dev/r/line-strip.jsonIn code
Branch strip · vertical · Simple line strip · Station name labels
A branched corridor with labels above and below the track.
pnpm dlx shadcn@latest add https://tfl-ts.dev/r/line-strip.jsonBranch strip · vertical · Simple line strip · Station name labels
A branched corridor with labels above and below the track.
pnpm dlx shadcn@latest add https://tfl-ts.dev/r/line-strip.jsonBranch strip · vertical · Simple line strip · Station name labels
54 stops
Use BranchStripHorizontal when the corridor reads left to right. Prefer LineStrip when you still need TfL label recipes and colour resolution.
import { BranchStripHorizontal } from "@/components/tfl/diagram/branch-strip-horizontal"
import { LineStrip } from "@/components/tfl/diagram/line-strip"
import { prepareBranchStrip } from "@/lib/tfl/strip-model"It ships with the line-strip registry item. No tfl-ts fetch inside this atom.
Takes a horizontal LineSchematic: lane and position nodes authored for this orientation. Do not rotate a vertical graph. The strip reads north-to-south or west-to-east.
Northern, District, and Metropolitan build that LineSchematic from the same passenger topology and lowest-energy layout the line topology page uses — permitted movements decide which pair is the through-move, then the relaxed layout is projected onto this lane × position grid (one lane per real branch, evenly spaced positions). Every other branched line still walks LINE_STATION_SEQUENCES, placing the longest inbound route as the trunk with branches north/west above it and south/east below.
Corridor joins use a 45° S when space allows, otherwise 90° R. A true spur is a single 45° diagonal with one R3x fillet. The terminus bar sits perpendicular to that diagonal.
A station keeps at most a Y — two-in-one-out or one-in-two-out. Once a real junction collects more incident tracks than that (District Earl's Court, DLR Poplar), the extra arms peel onto unlabelled joins staggered along the trunk instead of piling into one ring, matching how official in-carriage diagrams stagger a "direct joined branch". A confirmed real diamond, every incident track a genuine through-move (Northern Camden Town), stays a 2-in-2-out. Parallel corridors that share a name but never join, Euston, use duplicate nodes with a shared stationKey; the same split happens when the strongest matching turns up two independent through-pairs instead of one (Kennington, Poplar). A loop that is most of the line, Circle, is two parallel arcs plus the Hammersmith spur — not an unrolled sausage.
Pass mono to paint B&W Tube-map stroke motifs. Mono scales through x, not --tfl-diagram-scale.
54 stops
Use BranchStripHorizontal when the corridor reads left to right. Prefer LineStrip when you still need TfL label recipes and colour resolution.
import { BranchStripHorizontal } from "@/components/tfl/diagram/branch-strip-horizontal"
import { LineStrip } from "@/components/tfl/diagram/line-strip"
import { prepareBranchStrip } from "@/lib/tfl/strip-model"It ships with the line-strip registry item. No tfl-ts fetch inside this atom.
Takes a horizontal LineSchematic: lane and position nodes authored for this orientation. Do not rotate a vertical graph. The strip reads north-to-south or west-to-east.
Northern, District, and Metropolitan build that LineSchematic from the same passenger topology and lowest-energy layout the line topology page uses — permitted movements decide which pair is the through-move, then the relaxed layout is projected onto this lane × position grid (one lane per real branch, evenly spaced positions). Every other branched line still walks LINE_STATION_SEQUENCES, placing the longest inbound route as the trunk with branches north/west above it and south/east below.
Corridor joins use a 45° S when space allows, otherwise 90° R. A true spur is a single 45° diagonal with one R3x fillet. The terminus bar sits perpendicular to that diagonal.
A station keeps at most a Y — two-in-one-out or one-in-two-out. Once a real junction collects more incident tracks than that (District Earl's Court, DLR Poplar), the extra arms peel onto unlabelled joins staggered along the trunk instead of piling into one ring, matching how official in-carriage diagrams stagger a "direct joined branch". A confirmed real diamond, every incident track a genuine through-move (Northern Camden Town), stays a 2-in-2-out. Parallel corridors that share a name but never join, Euston, use duplicate nodes with a shared stationKey; the same split happens when the strongest matching turns up two independent through-pairs instead of one (Kennington, Poplar). A loop that is most of the line, Circle, is two parallel arcs plus the Hammersmith spur — not an unrolled sausage.
Pass mono to paint B&W Tube-map stroke motifs. Mono scales through x, not --tfl-diagram-scale.