tfl-ts and tfl-components
Typed TfL client plus the React boards that render it. Homepage dashboard here; docs on npm and tfl.manglekuo.com.
Live TfL dashboard
Live data through tfl-ts. Boards from tfl-components.
Central
- Westbound · Platform 1
- Eastbound · Platform 2
Victoria
- Northbound · Platform 6
- Southbound · Platform 5
Bakerloo
- Northbound
- No information
- Southbound · Platform 3
G
27
- 27
205
- 205
- 205
Minor Delays
- Northern
- Green ParkJubileePiccadilly
- Oxford CircusBakerlooCentral
- Warren StreetNorthern
- King's Cross St. PancrasKings Cross St. Pancras
- Highbury & IslingtonHighbury and Islington
- Finsbury Park
- Seven Sisters
- Tottenham Hale
- Blackhorse Road
- Walthamstow Central
Documentation
tfl-ts and tfl-components
London already publishes the arrivals. The work is getting them onto a screen that still looks like TfL.
tfl-ts is the typed client. tfl-components is the board library that draws what the client returns. The preview above is the same dashboard as the tfl-components homepage: Oxford Circus rail, Trafalgar Square buses, nearby cycle hire, Victoria strip. Treat it as a sample. For how to build, read the npm page and tfl.manglekuo.com.
The client
tfl-ts wraps the everyday calls (line, stopPoint, journey) and keeps raw.* for endpoints the wrappers do not cover. Line names, station order, and colours ship in the package. Status and arrivals hit TfL at runtime. Latest on npm is 2.9.0.
pnpm add tfl-tsLanguage: bashimport TflClient from "tfl-ts"; const client = new TflClient({ appKey: process.env.TFL_APP_KEY });const tube = await client.line.getStatus({ modes: ["tube"] });Language: tsOne key from the TfL API Portal. Set TFL_APP_KEY. app_id has been unused since 2021.
Gotchas, MCP, and the Next.js pattern live on the npm page.
The boards
tfl-components is the React library that goes with it. Arrivals, status, bus, cycle hire, maps, line strips, and the chips those boards are built from. Install a board, pass it data from tfl-ts.
pnpm dlx shadcn@latest add https://tfl.manglekuo.com/r/rail-arrivals-board.jsonLanguage: bashStart at the docs. The explorer is the fastest way to see how stop IDs and lines actually relate. If you only want a tablet on the wall, there is Board.