Dark social-first sign-in: provider wall + inline email form
import * as React from "react";
import { useState } from "react";
import { View } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import { Button, Divider, Icon, Input, Text } from "@lumioui/ui";
import { useHaptic } from "@lumioui/core";
import { AppleLogo, BLOCK_STAGGER, GlowSpot, GoogleLogo, Mount, World } from "../shared";
export interface LoginSocialScreenProps {
onSocialLogin?: (provider: "apple" | "google" | "email") => void;
onEmailLogin?: (email: string) => void;
onCreateAccount?: () => void;
onBack?: () => void;
}
/** Login — dark social-first variant (Whatnot/Discord idiom): brand wordmark
* centered in the open field, a stacked social-button wall, and an inline
* email form that unfolds when "Continue with Email" is tapped. The social
* wall IS the screen — the form is progressive disclosure, not the default. */
export function LoginSocialScreen({
onSocialLogin,
onEmailLogin,
onCreateAccount,
}: LoginSocialScreenProps) {
const haptics = useHaptic();
const [emailOpen, setEmailOpen] = useState(false);
const [email, setEmail] = useState("");
const pick = (provider: "apple" | "google" | "email") => {
haptics.light();
if (provider === "email") {
setEmailOpen((open) => !open);
}
onSocialLogin?.(provider);
};
return (
<World primary="#65A30D">
{/* Dark-first by design — the provider-wall idiom lives on a near-black
canvas in both schemes (Whatnot, Discord login). */}
<SafeAreaView className="flex-1 bg-neutral-950" edges={["top", "bottom"]}>
<View className="flex-1 px-6">
<Mount className="flex-1 items-center justify-center">
{/* Indigo glow behind the wordmark — keeps the dark stage from
reading as flat black. */}
<GlowSpot color="#BEF04C" size={260} className="-top-16 self-center" />
<Text variant="h1" className="text-white">
lumio
</Text>
<Text className="pt-2 text-center text-white/60">
Design-system components for React Native
</Text>
</Mount>
<Mount delay={BLOCK_STAGGER} className="gap-3">
<Button
size="lg"
onPress={() => pick("apple")}
accessibilityLabel="Continue with Apple"
icon={<AppleLogo size={18} color="#000" />}
className="w-full bg-white"
textClassName="text-black"
>
Continue with Apple
</Button>
<Button
size="lg"
onPress={() => pick("google")}
accessibilityLabel="Continue with Google"
icon={<GoogleLogo size={18} />}
className="w-full bg-white/15"
textClassName="text-white"
>
Continue with Google
</Button>
<Button
size="lg"
onPress={() => pick("email")}
accessibilityLabel={emailOpen ? "Hide email sign in" : "Continue with email"}
accessibilityState={{ expanded: emailOpen }}
icon={<Icon name="mail" size="sm" color="#fff" />}
className="w-full bg-white/15"
textClassName="text-white"
>
Continue with Email
</Button>
{emailOpen ? (
<Mount className="gap-3 pt-1">
<Input
glass
placeholder="you@example.com"
value={email}
onChangeText={setEmail}
keyboardType="email-address"
autoCapitalize="none"
accessibilityLabel="Email address"
className="text-white"
/>
<Button
size="lg"
disabled={!email.includes("@")}
onPress={() => {
haptics.light();
onEmailLogin?.(email);
}}
accessibilityLabel="Sign in with email"
className="bg-[#65A30D] w-full"
>
Sign in
</Button>
</Mount>
) : null}
</Mount>
<Mount delay={BLOCK_STAGGER * 2}>
<View className="items-center gap-5 pb-6 pt-8">
<View className="w-full flex-row items-center gap-4">
<Divider className="flex-1 bg-white/15" />
<Text className="text-xs text-white/50">or</Text>
<Divider className="flex-1 bg-white/15" />
</View>
<Button
variant="ghost"
onPress={() => {
haptics.light();
onCreateAccount?.();
}}
accessibilityLabel="Create an account"
>
<Text className="text-base text-white/60">
New here?{" "}
<Text className="font-semibold text-white underline">Create account</Text>
</Text>
</Button>
<Text className="text-center text-xs leading-5 text-white/40">
By continuing you agree to the Terms of Service{"\n"}and Privacy
Policy.
</Text>
</View>
</Mount>
</View>
</SafeAreaView>
</World>
);
}
LoginSocialScreen.displayName = "LoginSocialScreen";
Recreate the "Login — Social Screen" screen in React Native using LumioUI.
Goal: Dark social-first sign-in: provider wall + inline email form 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-login-social
```
Or pull just the components: `npx lumioui add button divider icon input 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>` ×5
### `divider` — Hairline rule with optional centered label, horizontal or vertical.
- `<Divider>` ×2
### `icon` — Lucide icon set mapped to theme colors and sizes.
- `<Icon>` ×1
### `input` — Labeled field with focus ring, error shake and success check.
- `<Input>` ×1
### `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/auth/login-social.tsx` exporting LoginSocialScreen. 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 { useState } from "react";
import { View } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import { Button, Divider, Icon, Input, Text } from "@lumioui/ui";
import { useHaptic } from "@lumioui/core";
import { AppleLogo, BLOCK_STAGGER, GlowSpot, GoogleLogo, Mount, World } from "../shared";
export interface LoginSocialScreenProps {
onSocialLogin?: (provider: "apple" | "google" | "email") => void;
onEmailLogin?: (email: string) => void;
onCreateAccount?: () => void;
onBack?: () => void;
}
/** Login — dark social-first variant (Whatnot/Discord idiom): brand wordmark
* centered in the open field, a stacked social-button wall, and an inline
* email form that unfolds when "Continue with Email" is tapped. The social
* wall IS the screen — the form is progressive disclosure, not the default. */
export function LoginSocialScreen({
onSocialLogin,
onEmailLogin,
onCreateAccount,
}: LoginSocialScreenProps) {
const haptics = useHaptic();
const [emailOpen, setEmailOpen] = useState(false);
const [email, setEmail] = useState("");
const pick = (provider: "apple" | "google" | "email") => {
haptics.light();
if (provider === "email") {
setEmailOpen((open) => !open);
}
onSocialLogin?.(provider);
};
return (
<World primary="#65A30D">
{/* Dark-first by design — the provider-wall idiom lives on a near-black
canvas in both schemes (Whatnot, Discord login). */}
<SafeAreaView className="flex-1 bg-neutral-950" edges={["top", "bottom"]}>
<View className="flex-1 px-6">
<Mount className="flex-1 items-center justify-center">
{/* Indigo glow behind the wordmark — keeps the dark stage from
reading as flat black. */}
<GlowSpot color="#BEF04C" size={260} className="-top-16 self-center" />
<Text variant="h1" className="text-white">
lumio
</Text>
<Text className="pt-2 text-center text-white/60">
Design-system components for React Native
</Text>
</Mount>
<Mount delay={BLOCK_STAGGER} className="gap-3">
<Button
size="lg"
onPress={() => pick("apple")}
accessibilityLabel="Continue with Apple"
icon={<AppleLogo size={18} color="#000" />}
className="w-full bg-white"
textClassName="text-black"
>
Continue with Apple
</Button>
<Button
size="lg"
onPress={() => pick("google")}
accessibilityLabel="Continue with Google"
icon={<GoogleLogo size={18} />}
className="w-full bg-white/15"
textClassName="text-white"
>
Continue with Google
</Button>
<Button
size="lg"
onPress={() => pick("email")}
accessibilityLabel={emailOpen ? "Hide email sign in" : "Continue with email"}
accessibilityState={{ expanded: emailOpen }}
icon={<Icon name="mail" size="sm" color="#fff" />}
className="w-full bg-white/15"
textClassName="text-white"
>
Continue with Email
</Button>
{emailOpen ? (
<Mount className="gap-3 pt-1">
<Input
glass
placeholder="you@example.com"
value={email}
onChangeText={setEmail}
keyboardType="email-address"
autoCapitalize="none"
accessibilityLabel="Email address"
className="text-white"
/>
<Button
size="lg"
disabled={!email.includes("@")}
onPress={() => {
haptics.light();
onEmailLogin?.(email);
}}
accessibilityLabel="Sign in with email"
className="bg-[#65A30D] w-full"
>
Sign in
</Button>
</Mount>
) : null}
</Mount>
<Mount delay={BLOCK_STAGGER * 2}>
<View className="items-center gap-5 pb-6 pt-8">
<View className="w-full flex-row items-center gap-4">
<Divider className="flex-1 bg-white/15" />
<Text className="text-xs text-white/50">or</Text>
<Divider className="flex-1 bg-white/15" />
</View>
<Button
variant="ghost"
onPress={() => {
haptics.light();
onCreateAccount?.();
}}
accessibilityLabel="Create an account"
>
<Text className="text-base text-white/60">
New here?{" "}
<Text className="font-semibold text-white underline">Create account</Text>
</Text>
</Button>
<Text className="text-center text-xs leading-5 text-white/40">
By continuing you agree to the Terms of Service{"\n"}and Privacy
Policy.
</Text>
</View>
</Mount>
</View>
</SafeAreaView>
</World>
);
}
LoginSocialScreen.displayName = "LoginSocialScreen";
```
Screen: https://lumioui.dev/screens/auth-login-social