tfl-components
DocsComponentsBlocksExplorerBoardGitHub
⌘K
GitHub
⌘K

Home / Rendering primitives

PreviousNext

Platform chip

Rail platform label in a muted rectangle. Narrows from Platform 4 to 4.

Primitive
Used byTube & Rail Arrivals

Preview

Installable via shadcn CLI

Installation

pnpm dlx shadcn@latest add https://tfl.manglekuo.com/r/platform-chip.json

In code

Tube & Rail Arrivals · Bus number chip · Station name labels

Open React components for London transport · press d for dark mode

86 visitors · 111 installs

v0.5.0

tfl-components
DocsComponentsBlocksExplorerBoardGitHub
⌘K
GitHub
Get started
  • Introduction
  • Components
  • Explorer
  • TypographyAbc
  • Colours
  • Roundel
Components
  • Tube & Rail Arrivals
  • Tube & Rail Status
  • Bus Arrivals
  • Cycle hire docks
  • Map (Geographic)
  • Simple line strip
  • Branch line strip
  • Station name labels
  • Platform chip
  • Bus number chip
  • Line title
  • Line chip
  • Troubleshoot
  • TfL brand licensing
Primitives & Foundations
  • Icons & pictograms
v0.5.0
⌘K

Home / Rendering primitives

PreviousNext

Platform chip

Rail platform label in a muted rectangle. Narrows from Platform 4 to 4.

Primitive
Used byTube & Rail Arrivals

Preview

Installable via shadcn CLI

Installation

pnpm dlx shadcn@latest add https://tfl.manglekuo.com/r/platform-chip.json

In code

Tube & Rail Arrivals · Bus number chip · Station name labels

On this page

Open React components for London transport · press d for dark mode

86 visitors · 111 installs

v0.5.0

  • Narrow

    4P4Plat 4Platform 4Canary Wharf
  • 18rem+

    4P4Plat 4Platform 4Canary Wharf
  • 26rem+

    4P4Plat 4Platform 4Canary Wharf
  • 34rem+

    4P4Plat 4Platform 4Canary Wharf

Width steps

Width steps need an @container/arrivals ancestor, as on RailArrivalsBoard. Label casing stays title-style (Platform 4, Plat 4). Vertical centering trims the text box to cap-alphabetic metrics.

import { PlatformChip } from "@/components/tfl/arrivals/platform-chip"

export default function Row() {
  return (
    <div className="@container/arrivals">
      <PlatformChip number="4" />
    </div>
  )
}
PropTypeDescription
numberstringPlatform number or letter after “Platform”.
classNamestringOptional class merge.

Visible form steps with board width: Platform N → Plat N → PN → N. aria-label stays Platform N.

Solid bg-muted-foreground fill, square corners, no border. Optical centre via [text-box:trim-both_cap_alphabetic].

  • Narrow

    4P4Plat 4Platform 4Canary Wharf
  • 18rem+

    4P4Plat 4Platform 4Canary Wharf
  • 26rem+

    4P4Plat 4Platform 4Canary Wharf
  • 34rem+

    4P4Plat 4Platform 4Canary Wharf

Width steps

Width steps need an @container/arrivals ancestor, as on RailArrivalsBoard. Label casing stays title-style (Platform 4, Plat 4). Vertical centering trims the text box to cap-alphabetic metrics.

import { PlatformChip } from "@/components/tfl/arrivals/platform-chip"

export default function Row() {
  return (
    <div className="@container/arrivals">
      <PlatformChip number="4" />
    </div>
  )
}
PropTypeDescription
numberstringPlatform number or letter after “Platform”.
classNamestringOptional class merge.

Visible form steps with board width: Platform N → Plat N → PN → N. aria-label stays Platform N.

Solid bg-muted-foreground fill, square corners, no border. Optical centre via [text-box:trim-both_cap_alphabetic].