Components
Route icon
A route's identity mark. Train lines are solid circles in the line color; bus routes are numbered Brand capsules. One family in three size roles.
Contract: components/route-icon.yaml. States are drawn live by transit.js.
Loading the contract…
Line letters
With Show line letters on, train icons carry their line code on the disc (routeIcon(type, id, size, { letters: true }) on the web), in the line's glyph color (--<line>-line-glyph), at 8 (standard) and 10 (large). Mini omits it: 6 would be under size.lineLetterMinimum. VoiceOver reads the line name either way.
Loading the contract…
iOS app specification
The app's rendering of this component, from the v3 spec.
Route icon
One family in three sizes. Train lines are plain circles, bus routes are numbered capsules in Brand.
| Sizes | Large 32 · Standard 24 · Mini 14 (bus 16) |
|---|---|
| Large | List rows, route page header |
| Standard | Arrival rows |
| Mini | Arrival preview on stop cards |
Variants
The route picks the form: a line-color disc for a train, a Brand capsule for a bus. Size: "mini" (14), standard (the default, 24) or "md" (large, 32). { letters: true } adds the line code when Show line letters is on, never at mini. Nothing else exists.
- Arrival previews on stop cards: mini.
- Arrival rows: standard.
- List rows and route headers: large (
"md").
// Do
const T = window.ChiTransitTransit;
T.routeIcon("train", "brown", null, { letters: showLineLetters });
T.routeIcon("bus", "146", "md");
// Don't: a bus route in its own color
<span class="route-icon bus" style="background:#e91e63">146</span>