Ugrow Uauth screen
import * as React from "react";
import { View } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import Svg, { Circle, Ellipse, Path, Rect } from "react-native-svg";
import { Button, Icon, Text } from "@lumioui/ui";
import { useHaptic } from "@lumioui/core";
import { Float, GoogleLogo, Mount, Press, StickyBottomBar } from "../shared";
/** The sprout-in-coin illustration — a two-coin stack with a sprouting
* plant, drawn in duotone teal like the reference's flat art. */
function SproutArt() {
return (
<Svg width={180} height={180} viewBox="0 0 180 180" accessible={false}>
{/* bottom coin */}
<Ellipse cx={90} cy={138} rx={46} ry={16} fill="#0B7B9E" />
<Rect x={44} y={122} width={92} height={16} fill="#0C8FB4" />
<Ellipse cx={90} cy={122} rx={46} ry={16} fill="#3BB0CE" />
{/* top coin */}
<Ellipse cx={90} cy={112} rx={46} ry={16} fill="#0B7B9E" />
<Rect x={44} y={96} width={92} height={16} fill="#0C8FB4" />
<Ellipse cx={90} cy={96} rx={46} ry={16} fill="#48BEDC" />
{/* stem + leaves */}
<Path d="M90 96 C 90 70 92 52 92 40" stroke="#0B5D78" strokeWidth={5} fill="none" strokeLinecap="round" />
<Path d="M92 58 C 62 58 48 40 44 22 C 70 24 88 38 92 58" fill="#0B6B8C" />
<Path d="M92 62 C 122 60 136 44 140 28 C 114 30 96 42 92 62" fill="#0D7FA2" />
<Path d="M92 84 C 78 84 70 76 68 68 C 80 70 88 76 92 84" fill="#0B6B8C" />
{/* sparkles */}
<Path d="M40 46 l3.5 8 8 3.5 -8 3.5 -3.5 8 -3.5 -8 -8 -3.5 8 -3.5 z" fill="#0B5D78" />
<Path d="M148 84 l3 7 7 3 -7 3 -3 7 -3 -7 -7 -3 7 -3 z" fill="#0B5D78" opacity={0.8} />
<Circle cx={132} cy={38} r={3} fill="#0B5D78" opacity={0.6} />
</Svg>
);
}
/** Grow auth — the mint onboarding: faint grid + sparkles behind the
* sprout illustration, display headline, email/Google pill pair, and the
* "Already have an account · Login" link. Page dots sit above the copy. */
export function GrowAuthScreen({ onEmail, onGoogle, onLogin }: { onEmail?: () => void; onGoogle?: () => void; onLogin?: () => void }) {
const haptics = useHaptic();
return (
<View className="flex-1 bg-[#A5E3F5]">
{/* faint grid */}
<View className="absolute inset-0 opacity-[0.14]">
{[1, 2, 3, 4].map((i) => (
<View key={`v${i}`} className="absolute top-0 bottom-0 w-px bg-[#0B5D78]" style={{ left: `${i * 20}%` }} />
))}
{[1, 2, 3, 4, 5].map((i) => (
<View key={`h${i}`} className="absolute left-0 right-0 h-px bg-[#0B5D78]" style={{ top: `${i * 16}%` }} />
))}
</View>
<SafeAreaView className="flex-1" edges={["top", "bottom"]}>
<View className="flex-1 items-center justify-center px-8">
<Mount className="items-center">
<Float distance={6}>
<SproutArt />
</Float>
{/* page dots — third elongated = active */}
<View className="mt-6 flex-row items-center gap-1.5">
<View className="h-1.5 w-1.5 rounded-full bg-white/90" />
<View className="h-1.5 w-1.5 rounded-full bg-white/90" />
<View className="h-1.5 w-6 rounded-full bg-[#0B5D78]" />
</View>
<Text className="mt-6 text-center text-[30px] font-bold leading-tight tracking-tight text-[#08455C]">
Make your money{"\n"}grow
</Text>
<Text className="mt-3 text-center text-[14.5px] leading-relaxed text-[#08455C]/65">
See your spending clearly and{"\n"}understand what matters the most
</Text>
</Mount>
</View>
<StickyBottomBar className="px-5">
<View className="gap-3">
<Button
size="lg"
className="w-full bg-[#08455C]"
textClassName="text-white"
icon={<Icon name="mail" size="sm" color="#FFFFFF" />}
onPress={() => {
haptics.light();
onEmail?.();
}}
accessibilityLabel="Continue with email"
>
Continue with email
</Button>
<Button
size="lg"
className="w-full bg-white"
textClassName="text-[#08455C]"
icon={<GoogleLogo />}
onPress={() => {
haptics.light();
onGoogle?.();
}}
accessibilityLabel="Continue with Google"
>
Continue with Google
</Button>
<Press
onPress={() => {
haptics.selection();
onLogin?.();
}}
accessibilityRole="button"
accessibilityLabel="Login"
className="items-center py-1"
>
<Text className="text-[13.5px] text-[#08455C]/70">
Already have an account{" "}
<Text className="font-bold text-[#08455C] underline">Login</Text>
</Text>
</Press>
</View>
</StickyBottomBar>
</SafeAreaView>
</View>
);
}
GrowAuthScreen.displayName = "GrowAuthScreen";
Recreate the "Ugrow Uauth Screen" screen in React Native using LumioUI.
Goal: Ugrow Uauth screen 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 auth-grow-auth
```
Or pull just the components: `npx lumioui add button text icon avatar`
Native packages:
- @lumioui/ui@latest
- @lumioui/core@latest
- react-native-safe-area-context@*
- react-native-svg@*
- react-native-reanimated@*
- 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>` ×2
### `text` — Themed type scale from caption to display.
- `<Text>` ×4
### `icon` — Lucide icon set mapped to theme colors and sizes.
- `<Icon>` ×1
### `avatar` — Circular user image with fallback initials and status dot.
- imported but not rendered directly — likely used through a sibling or as a utility
## 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/auth/grow-auth.tsx` exporting GrowAuthScreen. 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 { View } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import Svg, { Circle, Ellipse, Path, Rect } from "react-native-svg";
import { Button, Icon, Text } from "@lumioui/ui";
import { useHaptic } from "@lumioui/core";
import { Float, GoogleLogo, Mount, Press, StickyBottomBar } from "../shared";
/** The sprout-in-coin illustration — a two-coin stack with a sprouting
* plant, drawn in duotone teal like the reference's flat art. */
function SproutArt() {
return (
<Svg width={180} height={180} viewBox="0 0 180 180" accessible={false}>
{/* bottom coin */}
<Ellipse cx={90} cy={138} rx={46} ry={16} fill="#0B7B9E" />
<Rect x={44} y={122} width={92} height={16} fill="#0C8FB4" />
<Ellipse cx={90} cy={122} rx={46} ry={16} fill="#3BB0CE" />
{/* top coin */}
<Ellipse cx={90} cy={112} rx={46} ry={16} fill="#0B7B9E" />
<Rect x={44} y={96} width={92} height={16} fill="#0C8FB4" />
<Ellipse cx={90} cy={96} rx={46} ry={16} fill="#48BEDC" />
{/* stem + leaves */}
<Path d="M90 96 C 90 70 92 52 92 40" stroke="#0B5D78" strokeWidth={5} fill="none" strokeLinecap="round" />
<Path d="M92 58 C 62 58 48 40 44 22 C 70 24 88 38 92 58" fill="#0B6B8C" />
<Path d="M92 62 C 122 60 136 44 140 28 C 114 30 96 42 92 62" fill="#0D7FA2" />
<Path d="M92 84 C 78 84 70 76 68 68 C 80 70 88 76 92 84" fill="#0B6B8C" />
{/* sparkles */}
<Path d="M40 46 l3.5 8 8 3.5 -8 3.5 -3.5 8 -3.5 -8 -8 -3.5 8 -3.5 z" fill="#0B5D78" />
<Path d="M148 84 l3 7 7 3 -7 3 -3 7 -3 -7 -7 -3 7 -3 z" fill="#0B5D78" opacity={0.8} />
<Circle cx={132} cy={38} r={3} fill="#0B5D78" opacity={0.6} />
</Svg>
);
}
/** Grow auth — the mint onboarding: faint grid + sparkles behind the
* sprout illustration, display headline, email/Google pill pair, and the
* "Already have an account · Login" link. Page dots sit above the copy. */
export function GrowAuthScreen({ onEmail, onGoogle, onLogin }: { onEmail?: () => void; onGoogle?: () => void; onLogin?: () => void }) {
const haptics = useHaptic();
return (
<View className="flex-1 bg-[#A5E3F5]">
{/* faint grid */}
<View className="absolute inset-0 opacity-[0.14]">
{[1, 2, 3, 4].map((i) => (
<View key={`v${i}`} className="absolute top-0 bottom-0 w-px bg-[#0B5D78]" style={{ left: `${i * 20}%` }} />
))}
{[1, 2, 3, 4, 5].map((i) => (
<View key={`h${i}`} className="absolute left-0 right-0 h-px bg-[#0B5D78]" style={{ top: `${i * 16}%` }} />
))}
</View>
<SafeAreaView className="flex-1" edges={["top", "bottom"]}>
<View className="flex-1 items-center justify-center px-8">
<Mount className="items-center">
<Float distance={6}>
<SproutArt />
</Float>
{/* page dots — third elongated = active */}
<View className="mt-6 flex-row items-center gap-1.5">
<View className="h-1.5 w-1.5 rounded-full bg-white/90" />
<View className="h-1.5 w-1.5 rounded-full bg-white/90" />
<View className="h-1.5 w-6 rounded-full bg-[#0B5D78]" />
</View>
<Text className="mt-6 text-center text-[30px] font-bold leading-tight tracking-tight text-[#08455C]">
Make your money{"\n"}grow
</Text>
<Text className="mt-3 text-center text-[14.5px] leading-relaxed text-[#08455C]/65">
See your spending clearly and{"\n"}understand what matters the most
</Text>
</Mount>
</View>
<StickyBottomBar className="px-5">
<View className="gap-3">
<Button
size="lg"
className="w-full bg-[#08455C]"
textClassName="text-white"
icon={<Icon name="mail" size="sm" color="#FFFFFF" />}
onPress={() => {
haptics.light();
onEmail?.();
}}
accessibilityLabel="Continue with email"
>
Continue with email
</Button>
<Button
size="lg"
className="w-full bg-white"
textClassName="text-[#08455C]"
icon={<GoogleLogo />}
onPress={() => {
haptics.light();
onGoogle?.();
}}
accessibilityLabel="Continue with Google"
>
Continue with Google
</Button>
<Press
onPress={() => {
haptics.selection();
onLogin?.();
}}
accessibilityRole="button"
accessibilityLabel="Login"
className="items-center py-1"
>
<Text className="text-[13.5px] text-[#08455C]/70">
Already have an account{" "}
<Text className="font-bold text-[#08455C] underline">Login</Text>
</Text>
</Press>
</View>
</StickyBottomBar>
</SafeAreaView>
</View>
);
}
GrowAuthScreen.displayName = "GrowAuthScreen";
```
Screen: https://lumioui.dev/screens/auth-grow-auth