v0.1 public beta early access on GitHub
Home / Screens / travel-flight-live
Screen template

Flight Live Screen

FlightElite tracker: nebula world, glass flight card with progress line + countdown, emoji quick rows

pro Expo Go ✓ iosandroid gestures: tap · scroll haptics: light · medium · selection
$ npx lumioui add travel-flight-live
import { FlightLiveScreen } from "@/screens/travel/flight-live";
Registry dependencies4
Native packages installed6
@lumioui/ui@latest@lumioui/core@latestreact-native-reanimated@*react-native-safe-area-context@*react-native-svg@*nativewind@*
travel/flight-live.tsxsource · yours to edit
import * as React from "react";
import { ScrollView, View } from "react-native";
import Animated, { useAnimatedStyle, useSharedValue, withDelay, withTiming } from "react-native-reanimated";
import { SafeAreaView } from "react-native-safe-area-context";
import { Button, Icon, Text, type IconName } from "@lumioui/ui";
import { cn, useHaptic } from "@lumioui/core";
import { Float, Mount, Press, StickyBottomBar } from "../shared";

const QUICK: { icon: IconName; label: string; sub: string }[] = [
  { icon: "package", label: "Baggage claim", sub: "Carousel 4 · arrivals" },
  { icon: "coffee", label: "United Club", sub: "Gate B12 · open till 11 PM" },
  { icon: "pin", label: "Taxi to Downtown", sub: "~$48 · 24 min" },
];

/** Flight live — the FlightElite trip tracker: dark nebula world, glass
 *  flight card with a plane-dot progress line and countdown, then emoji
 *  quick rows in the same idiom as flight-preferences. */
export function FlightLiveScreen({
  onBack,
  onBoardingPass,
  onShare,
}: {
  onBack?: () => void;
  onBoardingPass?: () => void;
  onShare?: () => void;
}) {
  const haptics = useHaptic();
  const progress = useSharedValue(0);
  React.useEffect(() => {
    progress.value = withDelay(500, withTiming(0.62, { duration: 1400 }));
  }, [progress]);
  const fillStyle = useAnimatedStyle(() => ({ width: `${progress.value * 100}%` }));

  return (
    <View className="flex-1 bg-[#111114]">

      <SafeAreaView className="flex-1" edges={["top"]}>
        {/* Floating chrome — discs over the world. */}
        <View className="flex-row items-center gap-3 px-4 pt-1">
          <Press
            onPress={onBack}
            accessibilityRole="button"
            accessibilityLabel="Back"
            className="h-10 w-10 items-center justify-center rounded-full bg-white/[0.08]"
          >
            <Icon name="chevron-left" size="sm" color="#FFF" />
          </Press>
          <Text className="flex-1 text-center text-[15px] font-semibold text-white">Today</Text>
          <Press
            onPress={onShare}
            accessibilityRole="button"
            accessibilityLabel="Share flight"
            className="h-10 w-10 items-center justify-center rounded-full bg-white/[0.08]"
          >
            <Icon name="share" size="sm" color="#FFF" />
          </Press>
        </View>

        <ScrollView showsVerticalScrollIndicator={false} contentContainerClassName="gap-5 px-5 pb-40 pt-5">
          {/* Flight card — the hero object of this world. */}
          <Mount>
            <View className="overflow-hidden rounded-3xl border border-white/[0.1] bg-white/[0.06]">
              <View className="gap-4 p-5">
                <View className="flex-row items-center justify-between">
                  <Text className="text-[13px] font-semibold text-white/60">UA 2868 · Boeing 777</Text>
                  <View className="flex-row items-center gap-1.5 rounded-full bg-[#22C55E]/20 px-2.5 py-1">
                    <View className="h-1.5 w-1.5 rounded-full bg-[#22C55E]" />
                    <Text className="text-[11px] font-semibold text-[#22C55E]">On time</Text>
                  </View>
                </View>

                {/* Route — big IATA codes, plane riding the progress line. */}
                <View className="flex-row items-end justify-between">
                  <View>
                    <Text className="text-[38px] font-bold leading-[40px] tracking-tight text-white">JFK</Text>
                    <Text className="mt-1 text-[12px] text-white/50">4:20 PM</Text>
                  </View>
                  <View className="items-center pb-1">
                    <Float distance={2} duration={2200}>
                      <Icon name="plane" size="lg" color="#FFFFFF" />
                    </Float>
                    <Text className="mt-1 text-[11px] font-medium text-white/40">5h 34m</Text>
                  </View>
                  <View className="items-end">
                    <Text className="text-[38px] font-bold leading-[40px] tracking-tight text-white">SFO</Text>
                    <Text className="mt-1 text-[12px] text-white/50">7:54 PM</Text>
                  </View>
                </View>
                <View className="h-1 overflow-hidden rounded-full bg-white/15">
                  <Animated.View className="h-full rounded-full bg-white" style={fillStyle} />
                </View>

                {/* Countdown strip. */}
                <View className="flex-row items-center gap-2">
                  <View className="flex-row items-center gap-1.5 rounded-full bg-[#F59E0B]/20 px-2.5 py-1.5">
                    <Icon name="clock" size="sm" color="#F59E0B" />
                    <Text className="text-[12px] font-semibold text-[#F59E0B]">Doors close in 12:34</Text>
                  </View>
                  <View className="rounded-full bg-white/[0.08] px-2.5 py-1.5">
                    <Text className="text-[12px] font-semibold text-white/80">Gate B7</Text>
                  </View>
                  <View className="rounded-full bg-white/[0.08] px-2.5 py-1.5">
                    <Text className="text-[12px] font-semibold text-white/80">Seat 14A</Text>
                  </View>
                </View>
              </View>
            </View>
          </Mount>

          {/* Emoji quick rows — same list idiom as flight-preferences. */}
          <Mount delay={90} className="gap-2.5">
            <Text className="text-[12px] font-semibold uppercase tracking-[0.8px] text-white/50">
              At the airport
            </Text>
            {QUICK.map((q) => (
              <Press
                key={q.label}
                accessibilityRole="button"
                accessibilityLabel={q.label}
                onPress={() => haptics.selection()}
                className="flex-row items-center gap-3 rounded-2xl bg-white/[0.07] px-4 py-3.5"
              >
                <Icon name={q.icon} size="md" color="#FFFFFF" />
                <View className="flex-1">
                  <Text className="text-[15px] font-semibold text-white">{q.label}</Text>
                  <Text className="text-[12px] text-white/50">{q.sub}</Text>
                </View>
                <Icon name="chevron-right" size="sm" color="rgba(255,255,255,0.4)" />
              </Press>
            ))}
          </Mount>
        </ScrollView>

        <StickyBottomBar className="px-5">
          <View className="flex-row gap-2.5">
            <Button
              size="lg"
              className="flex-1 bg-white"
              textClassName="text-[#0B0B0F]"
              icon={<Icon name="credit-card" size="sm" color="#0B0B0F" />}
              onPress={() => {
                haptics.medium();
                onBoardingPass?.();
              }}
              accessibilityLabel="Show boarding pass"
            >
              Boarding pass
            </Button>
          </View>
        </StickyBottomBar>
      </SafeAreaView>
    </View>
  );
}
FlightLiveScreen.displayName = "FlightLiveScreen";
agent prompt — paste into Claude Code, Cursor, Devin…
Recreate the "Flight Live Screen" screen in React Native using LumioUI.

Goal: FlightElite tracker: nebula world, glass flight card with progress line + countdown, emoji quick rows Match the reference implementation's layout, behavior, and motion exactly — this is a production screen, not a mockup.

## Setup

Fastest path — install the screen plus its component deps:

```bash
npx lumioui add travel-flight-live
```

Or pull just the components: `npx lumioui add button glass icon text`

Native packages:
- @lumioui/ui@latest
- @lumioui/core@latest
- react-native-reanimated@*
- react-native-safe-area-context@*
- react-native-svg@*
- nativewind@*

Stack assumptions: Expo SDK 54 / RN 0.81, Reanimated 4, NativeWind v4, TypeScript strict, Expo Go compatible.

## Components — how, where, when

### `button` — Tactile pill button with press spring, ink wash and async loading.
- `<Button>` ×1

### `glass` — iOS 26 liquid-glass surface — real glass via expo-glass-effect (Expo Go) or @callstack/liquid-glass (dev builds), SVG refraction + specular rim on web, frosted fallback elsewhere; GlassContainer melts adjacent panes into one blob
- imported but not rendered directly — likely used through a sibling or as a utility

### `icon` — Lucide icon set mapped to theme colors and sizes.
- `<Icon>` ×7

### `text` — Themed type scale from caption to display.
- `<Text>` ×14

## Conventions (non-negotiable)

- Styling via NativeWind `className` with semantic tokens only: `bg-background`, `text-foreground`, `bg-card`, `text-card-foreground`, `bg-secondary`, `bg-muted`, `text-muted-foreground`, `bg-accent`, `bg-destructive`, `border-border`. Hard-coded colors only inside media overlays (`text-white`, `bg-black/N`).
- Motion via the token presets from `@lumioui/core` (`spring.press`, `spring.surface`, `spring.glide`, `timing.fast`, `timing.slow`, …) — no bespoke spring configs or durations.
- Gate transform motion behind `useReducedMotion()`; keep opacity/color feedback, drop travel and overshoot.
- Haptics via `useHaptic()`: `light` on press, `selection` on toggle/select, `warning` on invalid input. Never import expo-haptics directly.
- Press feedback via `usePressAnimation()` (~0.97 scale), not `activeOpacity` tricks.
- a11y: `accessibilityRole` + `accessibilityLabel` on every control, touch targets ≥44pt.
- Entrance choreography: staggered `Mount` wrappers (delay 0/60/120…) so regions land in sequence instead of popping in at once.
- Wrap the screen in `SafeAreaView`; keep dark mode working via the semantic tokens.

## Deliverable

One file: `screens/travel/flight-live.tsx` exporting FlightLiveScreen. Preserve the props interface — the host app wires the callbacks (navigation, submit handlers) through them.

## Reference implementation

The LumioUI source for this screen — reproduce it faithfully:

```tsx
import * as React from "react";
import { ScrollView, View } from "react-native";
import Animated, { useAnimatedStyle, useSharedValue, withDelay, withTiming } from "react-native-reanimated";
import { SafeAreaView } from "react-native-safe-area-context";
import { Button, Icon, Text, type IconName } from "@lumioui/ui";
import { cn, useHaptic } from "@lumioui/core";
import { Float, Mount, Press, StickyBottomBar } from "../shared";

const QUICK: { icon: IconName; label: string; sub: string }[] = [
  { icon: "package", label: "Baggage claim", sub: "Carousel 4 · arrivals" },
  { icon: "coffee", label: "United Club", sub: "Gate B12 · open till 11 PM" },
  { icon: "pin", label: "Taxi to Downtown", sub: "~$48 · 24 min" },
];

/** Flight live — the FlightElite trip tracker: dark nebula world, glass
 *  flight card with a plane-dot progress line and countdown, then emoji
 *  quick rows in the same idiom as flight-preferences. */
export function FlightLiveScreen({
  onBack,
  onBoardingPass,
  onShare,
}: {
  onBack?: () => void;
  onBoardingPass?: () => void;
  onShare?: () => void;
}) {
  const haptics = useHaptic();
  const progress = useSharedValue(0);
  React.useEffect(() => {
    progress.value = withDelay(500, withTiming(0.62, { duration: 1400 }));
  }, [progress]);
  const fillStyle = useAnimatedStyle(() => ({ width: `${progress.value * 100}%` }));

  return (
    <View className="flex-1 bg-[#111114]">

      <SafeAreaView className="flex-1" edges={["top"]}>
        {/* Floating chrome — discs over the world. */}
        <View className="flex-row items-center gap-3 px-4 pt-1">
          <Press
            onPress={onBack}
            accessibilityRole="button"
            accessibilityLabel="Back"
            className="h-10 w-10 items-center justify-center rounded-full bg-white/[0.08]"
          >
            <Icon name="chevron-left" size="sm" color="#FFF" />
          </Press>
          <Text className="flex-1 text-center text-[15px] font-semibold text-white">Today</Text>
          <Press
            onPress={onShare}
            accessibilityRole="button"
            accessibilityLabel="Share flight"
            className="h-10 w-10 items-center justify-center rounded-full bg-white/[0.08]"
          >
            <Icon name="share" size="sm" color="#FFF" />
          </Press>
        </View>

        <ScrollView showsVerticalScrollIndicator={false} contentContainerClassName="gap-5 px-5 pb-40 pt-5">
          {/* Flight card — the hero object of this world. */}
          <Mount>
            <View className="overflow-hidden rounded-3xl border border-white/[0.1] bg-white/[0.06]">
              <View className="gap-4 p-5">
                <View className="flex-row items-center justify-between">
                  <Text className="text-[13px] font-semibold text-white/60">UA 2868 · Boeing 777</Text>
                  <View className="flex-row items-center gap-1.5 rounded-full bg-[#22C55E]/20 px-2.5 py-1">
                    <View className="h-1.5 w-1.5 rounded-full bg-[#22C55E]" />
                    <Text className="text-[11px] font-semibold text-[#22C55E]">On time</Text>
                  </View>
                </View>

                {/* Route — big IATA codes, plane riding the progress line. */}
                <View className="flex-row items-end justify-between">
                  <View>
                    <Text className="text-[38px] font-bold leading-[40px] tracking-tight text-white">JFK</Text>
                    <Text className="mt-1 text-[12px] text-white/50">4:20 PM</Text>
                  </View>
                  <View className="items-center pb-1">
                    <Float distance={2} duration={2200}>
                      <Icon name="plane" size="lg" color="#FFFFFF" />
                    </Float>
                    <Text className="mt-1 text-[11px] font-medium text-white/40">5h 34m</Text>
                  </View>
                  <View className="items-end">
                    <Text className="text-[38px] font-bold leading-[40px] tracking-tight text-white">SFO</Text>
                    <Text className="mt-1 text-[12px] text-white/50">7:54 PM</Text>
                  </View>
                </View>
                <View className="h-1 overflow-hidden rounded-full bg-white/15">
                  <Animated.View className="h-full rounded-full bg-white" style={fillStyle} />
                </View>

                {/* Countdown strip. */}
                <View className="flex-row items-center gap-2">
                  <View className="flex-row items-center gap-1.5 rounded-full bg-[#F59E0B]/20 px-2.5 py-1.5">
                    <Icon name="clock" size="sm" color="#F59E0B" />
                    <Text className="text-[12px] font-semibold text-[#F59E0B]">Doors close in 12:34</Text>
                  </View>
                  <View className="rounded-full bg-white/[0.08] px-2.5 py-1.5">
                    <Text className="text-[12px] font-semibold text-white/80">Gate B7</Text>
                  </View>
                  <View className="rounded-full bg-white/[0.08] px-2.5 py-1.5">
                    <Text className="text-[12px] font-semibold text-white/80">Seat 14A</Text>
                  </View>
                </View>
              </View>
            </View>
          </Mount>

          {/* Emoji quick rows — same list idiom as flight-preferences. */}
          <Mount delay={90} className="gap-2.5">
            <Text className="text-[12px] font-semibold uppercase tracking-[0.8px] text-white/50">
              At the airport
            </Text>
            {QUICK.map((q) => (
              <Press
                key={q.label}
                accessibilityRole="button"
                accessibilityLabel={q.label}
                onPress={() => haptics.selection()}
                className="flex-row items-center gap-3 rounded-2xl bg-white/[0.07] px-4 py-3.5"
              >
                <Icon name={q.icon} size="md" color="#FFFFFF" />
                <View className="flex-1">
                  <Text className="text-[15px] font-semibold text-white">{q.label}</Text>
                  <Text className="text-[12px] text-white/50">{q.sub}</Text>
                </View>
                <Icon name="chevron-right" size="sm" color="rgba(255,255,255,0.4)" />
              </Press>
            ))}
          </Mount>
        </ScrollView>

        <StickyBottomBar className="px-5">
          <View className="flex-row gap-2.5">
            <Button
              size="lg"
              className="flex-1 bg-white"
              textClassName="text-[#0B0B0F]"
              icon={<Icon name="credit-card" size="sm" color="#0B0B0F" />}
              onPress={() => {
                haptics.medium();
                onBoardingPass?.();
              }}
              accessibilityLabel="Show boarding pass"
            >
              Boarding pass
            </Button>
          </View>
        </StickyBottomBar>
      </SafeAreaView>
    </View>
  );
}
FlightLiveScreen.displayName = "FlightLiveScreen";
```

Screen: https://lumioui.dev/screens/travel-flight-live
iPhone 17 · iOS
9:41
Live preview — the real screen via Expo Web · open full ↗