v0.1 public beta early access on GitHub
Home / Screens / social-arc-onboarding
Screen template

Arc Onboarding Screen

Card-stack splash: fanned theme cards, serif-italic accent, page dots, Next pill

pro Expo Go ✓ iosandroid gestures: tap haptics: light
$ npx lumioui add social-arc-onboarding
import { ArcOnboardingScreen } from "@/screens/social/arc-onboarding";
Registry dependencies4
Native packages installed6
@lumioui/ui@latest@lumioui/core@latestreact-native-safe-area-context@*react-native-reanimated@*react-native-svg@*nativewind@*
social/arc-onboarding.tsxsource · yours to edit
import * as React from "react";
import { Image, View } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import Animated, {
  useAnimatedStyle,
  useSharedValue,
  withSpring,
} from "react-native-reanimated";
import { Button, Text } from "@lumioui/ui";
import { cn, useHaptic, useReducedMotion } from "@lumioui/core";
import { catalogImg, Mount, Press, SERIF, StickyBottomBar } from "../shared";

/** Fanned arc cards — the stacked-deck hero: tilted theme cards overlapping
 *  like a hand you're dealt. Each card = accent field + photo + label. */
const CARDS = [
  { label: "75 Hard", italic: "Arc", hex: "#E2503B", img: "runner" },
  { label: "Artist", italic: "Arc", hex: "#F0A92E", img: "flatlay" },
  { label: "Green", italic: "Arc", hex: "#17935B", img: "denim" },
] as const;

const STEPS = [
  {
    title: "Create and Join\nArcs",
    italic: "Arcs",
    sub: "Choose your goal, set your theme, and start Day 1 today.",
  },
  {
    title: "Check in\nevery day",
    italic: "every day",
    sub: "One photo, one note — the arc stays alive while you do.",
  },
  {
    title: "Finish\ntogether",
    italic: "together",
    sub: "Your crew sees every check-in. Nobody quits alone.",
  },
] as const;

/** Where a card sits for each slot of the fan — slot 0 front center,
 *  slot 1 right tilt, slot 2 left tilt. Driven by the current step so the
 *  deck re-deals itself as you advance. */
const SLOTS = [
  { tx: 0, ty: 16, rot: -4, sc: 1, z: 10 },
  { tx: 122, ty: 0, rot: 10, sc: 0.9, z: 0 },
  { tx: -122, ty: 8, rot: -14, sc: 0.9, z: 0 },
] as const;

function ArcCard({ card, index, step }: { card: (typeof CARDS)[number]; index: number; step: number }) {
  const reduce = useReducedMotion();
  const slot = (CARDS.length - 1 - index + step + CARDS.length) % CARDS.length;
  const initial = SLOTS[(CARDS.length - 1 - index + CARDS.length) % CARDS.length] ?? SLOTS[0];
  const tx = useSharedValue(initial.tx);
  const ty = useSharedValue(initial.ty);
  const rot = useSharedValue(initial.rot);
  const sc = useSharedValue(initial.sc);
  React.useEffect(() => {
    const t = SLOTS[slot] ?? SLOTS[0];
    const cfg = reduce ? undefined : { damping: 16, stiffness: 140 };
    tx.value = reduce ? t.tx : withSpring(t.tx, cfg);
    ty.value = reduce ? t.ty : withSpring(t.ty, cfg);
    rot.value = reduce ? t.rot : withSpring(t.rot, cfg);
    sc.value = reduce ? t.sc : withSpring(t.sc, cfg);
  }, [slot, reduce, tx, ty, rot, sc]);
  const style = useAnimatedStyle(() => ({
    zIndex: (SLOTS[slot] ?? SLOTS[0]).z,
    transform: [
      { translateX: tx.value },
      { translateY: ty.value },
      { rotate: `${rot.value}deg` },
      { scale: sc.value },
    ],
  }));
  return (
    <Animated.View
      className="absolute top-0 left-1/2 h-56 w-40 -ml-20 overflow-hidden rounded-2xl p-2.5"
      style={[{ backgroundColor: card.hex }, style]}
    >
      <Text className="text-[15px] font-semibold leading-tight text-white">
        {card.label}{" "}
        <Text style={{ fontFamily: SERIF, fontStyle: "italic" }} className="text-[15px] text-white">
          {card.italic}
        </Text>
      </Text>
      <Image source={{ uri: catalogImg(card.img, 320, 400) }} className="mt-2 h-40 w-full rounded-xl" />
    </Animated.View>
  );
}

/** Arc onboarding — a tap-through flow like halo-memory: the dealt hand of
 *  theme cards persists and re-fans itself as each Next advances the page,
 *  dots track position, copy crossfades per step. */
export function ArcOnboardingScreen({
  onNext,
  onSkip,
  totalSteps = 3,
}: {
  onNext?: () => void;
  onSkip?: () => void;
  step?: number;
  totalSteps?: number;
}) {
  const haptics = useHaptic();
  const [step, setStep] = React.useState(0);
  const copy = STEPS[step] ?? STEPS[0];
  const last = step >= totalSteps - 1;

  const advance = () => {
    haptics.light();
    if (last) onNext?.();
    else setStep((s) => s + 1);
  };

  return (
    <View className="flex-1 bg-[#0B0B0F]">
      <SafeAreaView className="flex-1" edges={["top", "bottom"]}>
        <View className="flex-row items-center justify-between px-4 pt-1">
          <View className="w-10" />
          <Press onPress={onSkip} hitSlop={12} accessibilityRole="button" accessibilityLabel="Skip onboarding">
            <Text className="text-sm font-medium text-white/70">Skip</Text>
          </Press>
        </View>

        {/* Card stack — the deck re-deals as the step moves. */}
        <View className="h-[290px] items-center">
          {CARDS.map((c, i) => (
            <ArcCard key={c.label} card={c} index={i} step={step} />
          ))}
        </View>

        {/* Page dots — active elongates */}
        <View className="mt-2 flex-row items-center justify-center gap-1.5">
          {Array.from({ length: totalSteps }, (_, i) => (
            <View
              key={i}
              className={cn("h-1.5 rounded-full", i === step ? "w-6 bg-white" : "w-1.5 bg-white/25")}
            />
          ))}
        </View>

        <Mount key={step} className="mt-7 px-8">
          <Text className="text-center text-[34px] font-bold leading-tight tracking-tight text-white">
            {copy.title.split("\n")[0]}
            {"\n"}
            <Text style={{ fontFamily: SERIF, fontStyle: "italic" }} className="text-[34px] font-bold text-white">
              {copy.italic}
            </Text>
          </Text>
          <Text className="mt-3 text-center text-[15px] leading-6 text-white/60">
            {copy.sub}
          </Text>
        </Mount>

        <StickyBottomBar className="px-6">
          <Button
            size="lg"
            className="w-full bg-white"
            textClassName="text-[#0B0B0F]"
            onPress={advance}
            accessibilityLabel={last ? "Start" : "Next"}
          >
            {last ? "Start my first Arc" : "Next ›"}
          </Button>
        </StickyBottomBar>
      </SafeAreaView>
    </View>
  );
}
ArcOnboardingScreen.displayName = "ArcOnboardingScreen";
agent prompt — paste into Claude Code, Cursor, Devin…
Recreate the "Arc Onboarding Screen" screen in React Native using LumioUI.

Goal: Card-stack splash: fanned theme cards, serif-italic accent, page dots, Next pill 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 social-arc-onboarding
```

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

Native packages:
- @lumioui/ui@latest
- @lumioui/core@latest
- react-native-safe-area-context@*
- react-native-reanimated@*
- 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.
- imported but not rendered directly — likely used through a sibling or as a utility

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

## 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/social/arc-onboarding.tsx` exporting ArcOnboardingScreen. 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 { Image, View } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import Animated, {
  useAnimatedStyle,
  useSharedValue,
  withSpring,
} from "react-native-reanimated";
import { Button, Text } from "@lumioui/ui";
import { cn, useHaptic, useReducedMotion } from "@lumioui/core";
import { catalogImg, Mount, Press, SERIF, StickyBottomBar } from "../shared";

/** Fanned arc cards — the stacked-deck hero: tilted theme cards overlapping
 *  like a hand you're dealt. Each card = accent field + photo + label. */
const CARDS = [
  { label: "75 Hard", italic: "Arc", hex: "#E2503B", img: "runner" },
  { label: "Artist", italic: "Arc", hex: "#F0A92E", img: "flatlay" },
  { label: "Green", italic: "Arc", hex: "#17935B", img: "denim" },
] as const;

const STEPS = [
  {
    title: "Create and Join\nArcs",
    italic: "Arcs",
    sub: "Choose your goal, set your theme, and start Day 1 today.",
  },
  {
    title: "Check in\nevery day",
    italic: "every day",
    sub: "One photo, one note — the arc stays alive while you do.",
  },
  {
    title: "Finish\ntogether",
    italic: "together",
    sub: "Your crew sees every check-in. Nobody quits alone.",
  },
] as const;

/** Where a card sits for each slot of the fan — slot 0 front center,
 *  slot 1 right tilt, slot 2 left tilt. Driven by the current step so the
 *  deck re-deals itself as you advance. */
const SLOTS = [
  { tx: 0, ty: 16, rot: -4, sc: 1, z: 10 },
  { tx: 122, ty: 0, rot: 10, sc: 0.9, z: 0 },
  { tx: -122, ty: 8, rot: -14, sc: 0.9, z: 0 },
] as const;

function ArcCard({ card, index, step }: { card: (typeof CARDS)[number]; index: number; step: number }) {
  const reduce = useReducedMotion();
  const slot = (CARDS.length - 1 - index + step + CARDS.length) % CARDS.length;
  const initial = SLOTS[(CARDS.length - 1 - index + CARDS.length) % CARDS.length] ?? SLOTS[0];
  const tx = useSharedValue(initial.tx);
  const ty = useSharedValue(initial.ty);
  const rot = useSharedValue(initial.rot);
  const sc = useSharedValue(initial.sc);
  React.useEffect(() => {
    const t = SLOTS[slot] ?? SLOTS[0];
    const cfg = reduce ? undefined : { damping: 16, stiffness: 140 };
    tx.value = reduce ? t.tx : withSpring(t.tx, cfg);
    ty.value = reduce ? t.ty : withSpring(t.ty, cfg);
    rot.value = reduce ? t.rot : withSpring(t.rot, cfg);
    sc.value = reduce ? t.sc : withSpring(t.sc, cfg);
  }, [slot, reduce, tx, ty, rot, sc]);
  const style = useAnimatedStyle(() => ({
    zIndex: (SLOTS[slot] ?? SLOTS[0]).z,
    transform: [
      { translateX: tx.value },
      { translateY: ty.value },
      { rotate: `${rot.value}deg` },
      { scale: sc.value },
    ],
  }));
  return (
    <Animated.View
      className="absolute top-0 left-1/2 h-56 w-40 -ml-20 overflow-hidden rounded-2xl p-2.5"
      style={[{ backgroundColor: card.hex }, style]}
    >
      <Text className="text-[15px] font-semibold leading-tight text-white">
        {card.label}{" "}
        <Text style={{ fontFamily: SERIF, fontStyle: "italic" }} className="text-[15px] text-white">
          {card.italic}
        </Text>
      </Text>
      <Image source={{ uri: catalogImg(card.img, 320, 400) }} className="mt-2 h-40 w-full rounded-xl" />
    </Animated.View>
  );
}

/** Arc onboarding — a tap-through flow like halo-memory: the dealt hand of
 *  theme cards persists and re-fans itself as each Next advances the page,
 *  dots track position, copy crossfades per step. */
export function ArcOnboardingScreen({
  onNext,
  onSkip,
  totalSteps = 3,
}: {
  onNext?: () => void;
  onSkip?: () => void;
  step?: number;
  totalSteps?: number;
}) {
  const haptics = useHaptic();
  const [step, setStep] = React.useState(0);
  const copy = STEPS[step] ?? STEPS[0];
  const last = step >= totalSteps - 1;

  const advance = () => {
    haptics.light();
    if (last) onNext?.();
    else setStep((s) => s + 1);
  };

  return (
    <View className="flex-1 bg-[#0B0B0F]">
      <SafeAreaView className="flex-1" edges={["top", "bottom"]}>
        <View className="flex-row items-center justify-between px-4 pt-1">
          <View className="w-10" />
          <Press onPress={onSkip} hitSlop={12} accessibilityRole="button" accessibilityLabel="Skip onboarding">
            <Text className="text-sm font-medium text-white/70">Skip</Text>
          </Press>
        </View>

        {/* Card stack — the deck re-deals as the step moves. */}
        <View className="h-[290px] items-center">
          {CARDS.map((c, i) => (
            <ArcCard key={c.label} card={c} index={i} step={step} />
          ))}
        </View>

        {/* Page dots — active elongates */}
        <View className="mt-2 flex-row items-center justify-center gap-1.5">
          {Array.from({ length: totalSteps }, (_, i) => (
            <View
              key={i}
              className={cn("h-1.5 rounded-full", i === step ? "w-6 bg-white" : "w-1.5 bg-white/25")}
            />
          ))}
        </View>

        <Mount key={step} className="mt-7 px-8">
          <Text className="text-center text-[34px] font-bold leading-tight tracking-tight text-white">
            {copy.title.split("\n")[0]}
            {"\n"}
            <Text style={{ fontFamily: SERIF, fontStyle: "italic" }} className="text-[34px] font-bold text-white">
              {copy.italic}
            </Text>
          </Text>
          <Text className="mt-3 text-center text-[15px] leading-6 text-white/60">
            {copy.sub}
          </Text>
        </Mount>

        <StickyBottomBar className="px-6">
          <Button
            size="lg"
            className="w-full bg-white"
            textClassName="text-[#0B0B0F]"
            onPress={advance}
            accessibilityLabel={last ? "Start" : "Next"}
          >
            {last ? "Start my first Arc" : "Next ›"}
          </Button>
        </StickyBottomBar>
      </SafeAreaView>
    </View>
  );
}
ArcOnboardingScreen.displayName = "ArcOnboardingScreen";
```

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