suiss/uim · Block

Login Account

A two-step sign-in that asks for the email first, then reveals the password field, with inline errors.

Login Account is an open-source mobile screen from suiss/uim for React Native and Expo, with SwiftUI and Jetpack Compose versions built from the same design tokens. The @esuiss/uim CLI copies its source into your project, so you own the code.

iOS
Login Account on iOS in light mode

A sign-in screen inside a KeyboardScrollView. The email Input comes first; when the address looks valid, the password field appears below it and takes focus. Invalid input shakes the form and shows an error. It also has a Remember me Checkbox with a Label, a Forgot password link, a create account link, and a Spinner while signing in, followed by a welcome view with an Avatar and a Sign out link.

Installation

$ pnpm dlx @esuiss/uim@latest add login-account

The CLI also adds what it builds on: Avatar, Button, Checkbox, Icon, Input, Keyboard Scroll View, Label, Screen, Spinner, Text.

Manual

  1. Install the dependencies:
npx expo install cn phosphor-react-native react-native-reanimated react-native-svg react-native-worklets
  1. Add the pieces it builds on: Avatar, Button, Checkbox, Icon, Input, Keyboard Scroll View, Label, Screen, Spinner, Text.

  2. Copy the source into components/blocks/login-account.tsx:

uniwind/components/blocks/login-account.tsx
import { cn } from "cn"
import { ArrowRightIcon } from "phosphor-react-native"
import * as React from "react"
import { I18nManager, Pressable, type TextInput, View } from "react-native"
import {
  FadeIn,
  FadeInDown,
  ReduceMotion,
  useAnimatedStyle,
  useSharedValue,
  withSequence,
  withTiming,
} from "react-native-reanimated"
import { AnimatedView } from "@/components/ui/animated-view"
import { Avatar, AvatarFallback } from "@/components/ui/avatar"
import { Button } from "@/components/ui/button"
  1. Update the import paths to match your project.

Usage

import { LoginAccount } from "@/components/blocks/login-account"
<LoginAccount />

Wire onSubmit (receives the email and password) to your auth service, and onForgotPassword and onCreateAccount to your navigation. The sign-in delay and the success view are simulated in the component.