Skip to content

Signal

Components

ChiTransit launch

The ChiTransit lockup at cold launch: the app icon, then the wordmark sliding out beside it, ended by the app's first content.

React Native

A full-screen Paper overlay with the ChiTransit lockup: the app icon starts centred, as the native splash shows it, then slides left as the wordmark slides out beside it. The app is mounted and loading beneath it, and ready ends it, never the animation. A touch skips it, and it always leaves by motion.launchMaximumDuration (2.5s). It's live in the React Native gallery (Replay, Ready).

import { ChiTransitLaunch } from '@chitransit/signal/rn';

<View style={{ flex: 1 }}>
  <App />
  {launching && <ChiTransitLaunch ready={nearbyHasContent} onDone={() => setLaunching(false)} />}
</View>
PropUse
readyThe app has its first content. Ends the overlay, as do a touch and launchMaximumDuration.
onDoneAfter the fade, to unmount it. Called at once if it mounts already ready.
labelSpoken while visible; default "Loading".

Native splash

The splash shows the same generated image at the same size on Paper, so the overlay's first frame matches it exactly: platforms/rn/assets/brand/chitransit-launch-icon@3x.png (dark: chitransit-launch-icon-dark@3x.png), 120 pt wide (size.launchIcon plus size.launchSplashPadding on each side). Hide the splash on the overlay's first frame.

Contract

Contract: components/chi-transit-launch.yaml. States are drawn live by transit.js.

Variants

One form; no variants. The props are ready, onDone and label (default "Loading"). The start, slide, hold and fade come from ready and time; Reduce Motion shows the finished lockup. Nothing else exists.

// Do: the app mounts and loads beneath it
<View style={{ flex: 1 }}>
  <App />
  {launching && <ChiTransitLaunch ready={nearbyHasContent} onDone={() => setLaunching(false)} />}
</View>
// Don't: hold the app back until the overlay is gone
{launching ? <ChiTransitLaunch ready={false} onDone={() => setLaunching(false)} /> : <App />}

Usage

Do

  • Mount it on a cold launch only, over the app, and hide the native splash on the first frame.
  • Pass ready when the first screen has content, and unmount it in onDone.

Don't

  • Don't wait for the animation before showing or loading the app.
  • Don't show it on a warm start or a deep-link launch.

Accessibility

  • While visible it is one "Loading" element; the icon and wordmark are hidden. From ready it is hidden at once, so focus moves to the app during the fade.
  • Reduce Motion shows the finished lockup and fades it on ready.
  • A touch anywhere skips it; once it is leaving, touches reach the app.