Kinetik UI

Route Card

.md

A trip card: a line fills behind a plane between two big codes, above a slowly turning globe of dots.

v1.0.0Live on web@shopify/react-native-skiareact-native-reanimatedreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add route-card

The CLI copies the source and installs native dependencies with npx expo install, so versions match your Expo SDK. With shadcn: npx shadcn@latest add https://kinetik-ui.dev/r/route-card.json

Install manually

  1. Install dependencies
    npx expo install @shopify/react-native-skia react-native-reanimated react-native-worklets
  2. Copy the source files
    • components/kinetik/route-card.tsx
    View source files

Usage

import { RouteCard } from '@/components/kinetik/route-card';

<RouteCard
  from={{ code: 'IST', city: 'ISTANBUL', time: '09:40AM' }}
  to={{ code: 'NRT', city: 'TOKYO', time: '03:25PM' }}
  status="ON SCHEDULE"
  tag="KN204"
  progress={elapsed / duration}
/>;

When to use

  • The main card for a trip under way: a flight, a long train, a sea crossing.
  • A hero widget where the globe has room to breathe, next to smaller cards such as Arrival Card and Cruise Dial.

When not to use

  • Lists of trips: every card runs its own turning globe. Use Flight Track instead.
  • Trips with stops: one line cannot show them.

Notes

  • progress is yours to compute. Each change glides the plane along the line.
  • Pass your logo as mark, or null for none.
  • The globe's land is a rough, stylised shape, not a map. Do not use it to show real positions.
  • The plane is the Tabler Icons plane (MIT licence, via iconstack.io).

Props

RouteCardProps

PropTypeDefaultDescription
fromrequiredRouteStop—
torequiredRouteStop—
progressrequirednumber—How far along the trip is, 0–1. Changes glide the plane along the line.
statusstring—Status between the cities, e.g. "ON SCHEDULE".
tagstring—Chip in the corner, e.g. the flight number.
departLabelstring'BOARDS:'Label before the departure time. Defaults to "BOARDS:".
arriveLabelstring'LANDS:'Label before the arrival time. Defaults to "LANDS:".
markReactNode—Mark in the far corner, usually your logo. Defaults to a small star; null hides it.
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
The globe redraws a few hundred dots on the UI thread at 30 fps while on screen, so it animates at rest. The plane only moves when progress changes.
Measured

Huawei P20 Lite (ANE-LX1), Android 9, release build · 19 ms median frame, 27 ms p90 · keeps drawing at rest · 142 MB app memory. Animating at rest: the globe turns at 30 fps. An old mid-range phone; the numbers include scrolling the demo page.

Accessibility

Reduced motion
The globe holds still and the plane jumps to its place.
Screen readers
One progress bar reading the route and times ("IST, ISTANBUL, to NRT, TOKYO. BOARDS: 09:40AM, LANDS: 03:25PM. ON SCHEDULE. KN204.") with "58% of the way".
Touch target
Not interactive.

Source files

components/kinetik/route-card.tsx is in the Code tab of the preview above.