Components
Components
Every web component in the CSS system and every cross-platform component contract.
Signal has three kinds of component. Web components are CSS classes in chitransit.css, styled only from tokens. Contracts are the cross-platform transit components specified in components/*.yaml and implemented natively on web and iOS. iOS app components are specified in the v3 spec and rendered here as mockups.
Web components
The shared CSS system in /site/chitransit.css: tokens and base in cascade layers (any page rule overrides them), then component and utility classes. Every value comes from tokens.json or components.tokens.json; go test ./... fails on a raw colour or size in a component file.
Classes use the ct- prefix and --modifier variants; state comes from aria-pressed, aria-current, [disabled] and :focus-visible. Each component reads var(--button-radius, var(--ct-button-radius)): change the token to restyle every instance, or set --button-radius on one element to override it. Utilities: .ct-m-* .ct-p-* .ct-gap-* (space scale), .ct-text-* .ct-weight-* .ct-color-* .ct-bg-* .ct-radius-* .ct-shadow-* (generated from the tokens), .ct-flex, .ct-grid-*, .ct-visually-hidden.
Each sample shows light (left) and dark (right).
Contracts
Each contract page draws every state live on the web, in light and dark, beside the iOS screenshot of the same state, with anatomy, tokens, accessibility and platform differences from the YAML.