Platforms
React Native
Signal's React Native components for iOS, Android and the web, rendered live through react-native-web in light, dark and themes.
@chitransit/signal/rn is Signal for React Native: the theme runtime and the components the app draws, generated from the same tokens as the CSS and native token outputs. It runs on iOS and Android and on the web through react-native-web. Native-only surfaces (lists, forms, menus, tabs, sheets and glass drawn with SwiftUI) keep the system controls; Signal supplies their tokens and the web and Android fallback.
| Import | What it is |
|---|---|
@chitransit/signal/rn | SignalProvider, useSignal(), the components, toast(), line helpers and derivePalette |
@chitransit/signal/tokens | Every token as typed as const data (generated) |
@chitransit/signal/map/style-light.json, style-dark.json | The MapLibre styles (generated) |
Rules
- Tap targets are at least 44 pt: controls drawn smaller (Button
sm, the toast action and close, the Switch) reach it throughhitSlopon iOS and Android and a real 44 pt box on react-native-web, which ignoreshitSlop. Buttons, radios, switches and toggles carry their role, label and state. - On the web, keyboard focus draws the Signal ring (2.5 pt Accent, 2 pt out); the shell renders a skip link to
#main, then navigation, search, main and the map last. - Reduce Motion: presses dim without shrinking, toasts fade in place. Reduce Transparency and Increase Contrast: glass becomes solid Paper with a Line border, and colors take their high-contrast values.
- Icons are the Signal glyphs: generated template PNGs tinted on iOS and Android, a CSS mask on the web. No SVG module.
Gallery
The components below are the package itself, bundled with react-native-web. Light and dark sit side by side, then the 8-bit theme and a derived palette. Press Tab to see the focus ring and the skip link; Alt+T focuses the toasts.