Skip to content

Signal

Getting started

Install

Use Signal on the web, in React Native, or from the platform-neutral token files.

Install

@chitransit/signal is published to GitHub Packages. Configure the consuming project’s .npmrc:

@chitransit:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}

Use a dedicated classic personal access token with only read:packages. Never commit it.

npm install @chitransit/signal

React Native

Import components and the theme runtime from @chitransit/signal/rn; plain tokens from @chitransit/signal/tokens. See the live component gallery.

MapLibre

import { createStyle, stationFeatures, designState } from '@chitransit/signal/map';
const style = createStyle({ theme: 'dark', sources, glyphs });

Use the same layers with web MapLibre or MapLibre React Native. Map rules · Playground.

Web CSS

Load @chitransit/signal/chitransit.css before page styles. Existing vanilla transit components also use transit.css and transit.js. See Web CSS.

Native extension targets

Copy the generated Swift or Kotlin token file into an app-owned native target. Signal no longer ships Swift components. See Native targets.