v0.1 public beta early access on GitHub
Home / Screens / finance-wallet-home
Screen template

Wallet Home Screen

Balance hero with quick actions and activity

pro Expo Go ✓ iosandroid gestures: tap · scroll haptics: light · selection
$ npx lumioui add finance-wallet-home
import { WalletHomeScreen } from "@/screens/finance/wallet-home";
Registry dependencies5
Native packages installed6
@lumioui/ui@latest@lumioui/core@latestreact-native-safe-area-context@*react-native-reanimated@*react-native-svg@*nativewind@*
finance/wallet-home.tsxsource · yours to edit
import * as React from "react";
import { ScrollView, View } from "react-native";
import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
import { Avatar, Button, Glass, Icon, type IconName, List, Text } from "@lumioui/ui";
import { useHaptic } from "@lumioui/core";
import { MONO, Mount, Press } from "../shared";

export interface WalletAction {
  id: string;
  label: string;
  icon: IconName;
}

export interface WalletActivity {
  id: string;
  name: string;
  detail: string;
  /** Signed amount, e.g. "+$420.00" / "-$12.90". */
  amount: string;
  avatarUrl?: string;
}

export interface WalletHomeScreenProps {
  name?: string;
  avatarUrl?: string;
  balance?: string;
  actions?: WalletAction[];
  activity?: WalletActivity[];
  onAction?: (id: string) => void;
  onActivityPress?: (id: string) => void;
  onNotifications?: () => void;
}

const face = (n: number) => `https://i.pravatar.cc/150?img=${n}`;

const DEFAULT_ACTIONS: WalletAction[] = [
  { id: "send", label: "Send", icon: "arrow-up" },
  { id: "request", label: "Request", icon: "arrow-down" },
  { id: "scan", label: "Scan", icon: "scan-face" },
  { id: "topup", label: "Top up", icon: "plus" },
];

const DEFAULT_ACTIVITY: WalletActivity[] = [
  { id: "w1", name: "Elena Ruiz", detail: "Dinner split", amount: "+$42.50", avatarUrl: face(24) },
  { id: "w2", name: "Instacart", detail: "Groceries", amount: "-$86.12" },
  { id: "w3", name: "Milo Park", detail: "Concert tickets", amount: "-$120.00", avatarUrl: face(15) },
];

/** Wallet home — dark balance hero, quick actions, recent activity. */
export function WalletHomeScreen({
  name = "Amara Chen",
  avatarUrl = face(9),
  balance = "$4,280.50",
  actions = DEFAULT_ACTIONS,
  activity = DEFAULT_ACTIVITY,
  onAction,
  onActivityPress,
  onNotifications,
}: WalletHomeScreenProps) {
  const haptics = useHaptic();
  const insets = useSafeAreaInsets();

  return (
    <SafeAreaView className="flex-1 bg-[#F4F5F9] dark:bg-[#111114]" edges={["top"]}>
      {/* Header — avatar + name + bell. */}
      <View className="flex-row items-center gap-3 px-4 pb-3 pt-2">
        <Avatar
          size="md"
          source={{ uri: avatarUrl }}
          fallback={name}
          alt={name}
        />
        <Mount className="flex-1">
          <Text variant="small" className="text-muted-foreground">
            Good evening
          </Text>
          <Text className="font-semibold">{name}</Text>
        </Mount>
        <Glass interactive effect="regular" className="h-11 w-11 items-center justify-center rounded-full">
          <Press
            haptic="light"
            onPress={() => onNotifications?.()}
            accessibilityRole="button"
            accessibilityLabel="Notifications"
            className="h-9 w-9 items-center justify-center"
          >
            <Icon name="bell" size="sm" color="foreground" />
          </Press>
        </Glass>
      </View>

      <ScrollView
        showsVerticalScrollIndicator={false}
        contentContainerStyle={{ paddingBottom: insets.bottom + 32 }}
      >
        {/* Balance hero — dark card, big thin-ish numeral, actions inside. */}
        <Mount delay={60} className="mx-4 gap-4 rounded-3xl bg-[#1B1B26] p-5">
          <View>
            <View className="flex-row items-center justify-between">
              <Text className="text-xs text-background/60">Total balance</Text>
              {/* Card count — wallets lead with what's inside. */}
              <Text className="text-xs text-background/50">3 cards</Text>
            </View>
            <Text className="mt-1 text-5xl font-bold tracking-tight text-background" style={{ fontFamily: MONO, fontVariant: ["tabular-nums"] }}>
              {balance}
            </Text>
          </View>
          <View className="flex-row justify-between">
            {actions.map((a) => (
              <View key={a.id} className="items-center gap-1.5">
                <Button
                  variant="secondary"
                  size="icon"
                  haptic="light"
                  onPress={() => {
                    haptics.light();
                    onAction?.(a.id);
                  }}
                  accessibilityLabel={a.label}
                  className="h-12 w-12 rounded-full bg-white/10"
                >
                  <Icon name={a.icon} size="sm" color="#FFFFFF" />
                </Button>
                <Text className="text-xs text-background/70">{a.label}</Text>
              </View>
            ))}
          </View>
        </Mount>

        {/* Activity. */}
        <Mount delay={120} className="mt-5">
          <List inset>
            <List.Section title="Recent activity">
              {activity.map((a, ii) => (
                <React.Fragment key={a.id}>
                  {ii > 0 && <List.Separator className="ml-[68px]" />}
                  <List.Item
                    title={a.name}
                    subtitle={a.detail}
                    leading={
                      <Avatar
                        size="md"
                        source={a.avatarUrl ? { uri: a.avatarUrl } : undefined}
                        fallback={a.name}
                        alt={a.name}
                      />
                    }
                    trailing={
                      <Text
                        className={`font-semibold ${
                          a.amount.startsWith("+") ? "text-success" : ""
                        }`}
                      >
                        {a.amount}
                      </Text>
                    }
                    haptic="light"
                    onPress={() => onActivityPress?.(a.id)}
                    className="py-3"
                  />
                </React.Fragment>
              ))}
            </List.Section>
          </List>
        </Mount>

        {/* Promo banner — pushes the next-best action into the dead zone. */}
        <Mount delay={180} className="mx-4 mt-4 flex-row items-center gap-3 rounded-2xl bg-white p-4 dark:bg-[#1A1A20]">
          <View className="h-10 w-10 items-center justify-center rounded-2xl bg-[#EDF8C4]">
            <Icon name="briefcase" size="sm" color="#65A30D" />
          </View>
          <View className="flex-1">
            <Text className="text-sm font-semibold">Set up direct deposit</Text>
            <Text className="text-xs text-muted-foreground">
              Get paid up to 2 days early
            </Text>
          </View>
          <Icon name="chevron-right" size="sm" color="mutedForeground" />
        </Mount>
      </ScrollView>
    </SafeAreaView>
  );
}
WalletHomeScreen.displayName = "WalletHomeScreen";
agent prompt — paste into Claude Code, Cursor, Devin…
Recreate the "Wallet Home Screen" screen in React Native using LumioUI.

Goal: Balance hero with quick actions and activity 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 finance-wallet-home
```

Or pull just the components: `npx lumioui add avatar button icon list 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

### `avatar` — Circular user image with fallback initials and status dot.
- `<Avatar>` ×2

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

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

### `list` — Settings-style rows with separators and press feedback.
- `<List>` ×1

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

## 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/finance/wallet-home.tsx` exporting WalletHomeScreen. 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 { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
import { Avatar, Button, Glass, Icon, type IconName, List, Text } from "@lumioui/ui";
import { useHaptic } from "@lumioui/core";
import { MONO, Mount, Press } from "../shared";

export interface WalletAction {
  id: string;
  label: string;
  icon: IconName;
}

export interface WalletActivity {
  id: string;
  name: string;
  detail: string;
  /** Signed amount, e.g. "+$420.00" / "-$12.90". */
  amount: string;
  avatarUrl?: string;
}

export interface WalletHomeScreenProps {
  name?: string;
  avatarUrl?: string;
  balance?: string;
  actions?: WalletAction[];
  activity?: WalletActivity[];
  onAction?: (id: string) => void;
  onActivityPress?: (id: string) => void;
  onNotifications?: () => void;
}

const face = (n: number) => `https://i.pravatar.cc/150?img=${n}`;

const DEFAULT_ACTIONS: WalletAction[] = [
  { id: "send", label: "Send", icon: "arrow-up" },
  { id: "request", label: "Request", icon: "arrow-down" },
  { id: "scan", label: "Scan", icon: "scan-face" },
  { id: "topup", label: "Top up", icon: "plus" },
];

const DEFAULT_ACTIVITY: WalletActivity[] = [
  { id: "w1", name: "Elena Ruiz", detail: "Dinner split", amount: "+$42.50", avatarUrl: face(24) },
  { id: "w2", name: "Instacart", detail: "Groceries", amount: "-$86.12" },
  { id: "w3", name: "Milo Park", detail: "Concert tickets", amount: "-$120.00", avatarUrl: face(15) },
];

/** Wallet home — dark balance hero, quick actions, recent activity. */
export function WalletHomeScreen({
  name = "Amara Chen",
  avatarUrl = face(9),
  balance = "$4,280.50",
  actions = DEFAULT_ACTIONS,
  activity = DEFAULT_ACTIVITY,
  onAction,
  onActivityPress,
  onNotifications,
}: WalletHomeScreenProps) {
  const haptics = useHaptic();
  const insets = useSafeAreaInsets();

  return (
    <SafeAreaView className="flex-1 bg-[#F4F5F9] dark:bg-[#111114]" edges={["top"]}>
      {/* Header — avatar + name + bell. */}
      <View className="flex-row items-center gap-3 px-4 pb-3 pt-2">
        <Avatar
          size="md"
          source={{ uri: avatarUrl }}
          fallback={name}
          alt={name}
        />
        <Mount className="flex-1">
          <Text variant="small" className="text-muted-foreground">
            Good evening
          </Text>
          <Text className="font-semibold">{name}</Text>
        </Mount>
        <Glass interactive effect="regular" className="h-11 w-11 items-center justify-center rounded-full">
          <Press
            haptic="light"
            onPress={() => onNotifications?.()}
            accessibilityRole="button"
            accessibilityLabel="Notifications"
            className="h-9 w-9 items-center justify-center"
          >
            <Icon name="bell" size="sm" color="foreground" />
          </Press>
        </Glass>
      </View>

      <ScrollView
        showsVerticalScrollIndicator={false}
        contentContainerStyle={{ paddingBottom: insets.bottom + 32 }}
      >
        {/* Balance hero — dark card, big thin-ish numeral, actions inside. */}
        <Mount delay={60} className="mx-4 gap-4 rounded-3xl bg-[#1B1B26] p-5">
          <View>
            <View className="flex-row items-center justify-between">
              <Text className="text-xs text-background/60">Total balance</Text>
              {/* Card count — wallets lead with what's inside. */}
              <Text className="text-xs text-background/50">3 cards</Text>
            </View>
            <Text className="mt-1 text-5xl font-bold tracking-tight text-background" style={{ fontFamily: MONO, fontVariant: ["tabular-nums"] }}>
              {balance}
            </Text>
          </View>
          <View className="flex-row justify-between">
            {actions.map((a) => (
              <View key={a.id} className="items-center gap-1.5">
                <Button
                  variant="secondary"
                  size="icon"
                  haptic="light"
                  onPress={() => {
                    haptics.light();
                    onAction?.(a.id);
                  }}
                  accessibilityLabel={a.label}
                  className="h-12 w-12 rounded-full bg-white/10"
                >
                  <Icon name={a.icon} size="sm" color="#FFFFFF" />
                </Button>
                <Text className="text-xs text-background/70">{a.label}</Text>
              </View>
            ))}
          </View>
        </Mount>

        {/* Activity. */}
        <Mount delay={120} className="mt-5">
          <List inset>
            <List.Section title="Recent activity">
              {activity.map((a, ii) => (
                <React.Fragment key={a.id}>
                  {ii > 0 && <List.Separator className="ml-[68px]" />}
                  <List.Item
                    title={a.name}
                    subtitle={a.detail}
                    leading={
                      <Avatar
                        size="md"
                        source={a.avatarUrl ? { uri: a.avatarUrl } : undefined}
                        fallback={a.name}
                        alt={a.name}
                      />
                    }
                    trailing={
                      <Text
                        className={`font-semibold ${
                          a.amount.startsWith("+") ? "text-success" : ""
                        }`}
                      >
                        {a.amount}
                      </Text>
                    }
                    haptic="light"
                    onPress={() => onActivityPress?.(a.id)}
                    className="py-3"
                  />
                </React.Fragment>
              ))}
            </List.Section>
          </List>
        </Mount>

        {/* Promo banner — pushes the next-best action into the dead zone. */}
        <Mount delay={180} className="mx-4 mt-4 flex-row items-center gap-3 rounded-2xl bg-white p-4 dark:bg-[#1A1A20]">
          <View className="h-10 w-10 items-center justify-center rounded-2xl bg-[#EDF8C4]">
            <Icon name="briefcase" size="sm" color="#65A30D" />
          </View>
          <View className="flex-1">
            <Text className="text-sm font-semibold">Set up direct deposit</Text>
            <Text className="text-xs text-muted-foreground">
              Get paid up to 2 days early
            </Text>
          </View>
          <Icon name="chevron-right" size="sm" color="mutedForeground" />
        </Mount>
      </ScrollView>
    </SafeAreaView>
  );
}
WalletHomeScreen.displayName = "WalletHomeScreen";
```

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