Kinetik UI

Trip Glance

.md

A plane flies along a line that curves down to its destination, a white trail behind and green ahead.

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

Installation

Kinetik CLI
npx kinetik-ui add trip-glance

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/trip-glance.json

Install manually

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

Usage

import { TripGlance } from '@/components/kinetik/trip-glance';

<TripGlance
  code="KN81"
  destination="OSL"
  minutesLeft={176}
  progress={0.34}
  status="Landing early"
  bags={2}
/>;

When to use

  • A trip in progress on a home screen or a live widget.
  • Anywhere the time left matters more than the map.

When not to use

  • Trips with stops: one line cannot show them.
  • When progress is unknown: an estimate that jumps backwards confuses people.

Notes

  • progress and minutesLeft are yours to compute.
  • The plane is the Tabler Icons plane (MIT licence, via iconstack.io).

Props

TripGlanceProps

PropTypeDefaultDescription
coderequiredstring—Trip code in the corner, e.g. "KN81".
destinationrequiredstring—Destination code at the end of the route, e.g. "OSL".
minutesLeftrequirednumber—Minutes still to go.
progressrequirednumber—How far along the trip is, 0–1. Changes glide the plane along the route.
statusstring—Line under the time, e.g. "Landing early".
bagsnumber—Bags in the yellow badge. Hidden when not given.
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
The plane and trail run on one UI-thread spring when progress changes. One small view ripples at the destination until arrival.
Measured

Huawei P20 Lite (ANE-LX1), Android 9, release build · 19 ms median frame, 24 ms p90 · keeps drawing at rest · 130 MB app memory

Accessibility

Reduced motion
The plane jumps to its place, the time does not count and the destination does not ripple.
Screen readers
One progress bar ("KN81 to OSL. 2 hours 56 minutes left. Landing early. 2 bags").
Touch target
Not interactive.

Source files

components/kinetik/trip-glance.tsx is in the Code tab of the preview above.