suiss/uim · Block

Login Passkey

A passkey sign-in screen with a face scan dialog and a welcome view after verifying.

Login Passkey 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 Passkey on iOS in light mode

A sign-in screen that shows the account with an Avatar, a Change link, a Continue with passkey Button and a link to sign in with a password. Continuing opens a Dialog with an animated scan glyph that turns into a verified state, then shows a welcome view with a Sign out link. The dialog can be cancelled during the scan.

Installation

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

The CLI also adds what it builds on: Avatar, Button, Dialog, Icon, Screen, 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, Dialog, Icon, Screen, Text.

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

uniwind/components/blocks/login-passkey.tsx
import { cn } from "cn"
import { CheckIcon, KeyIcon, ScanSmileyIcon } from "phosphor-react-native"
import * as React from "react"
import { Pressable, ScrollView, View } from "react-native"
import {
  cancelAnimation,
  FadeInDown,
  ReduceMotion,
  useAnimatedStyle,
  useSharedValue,
  withRepeat,
  withSequence,
  withSpring,
  withTiming,
} from "react-native-reanimated"
import { AnimatedView } from "@/components/ui/animated-view"
  1. Update the import paths to match your project.

Usage

import { LoginPasskey } from "@/components/blocks/login-passkey"
<LoginPasskey />

Call your passkey API from onContinue, and wire onChangeAccount and onUsePassword to your navigation. The account details and the scan timing are sample values in the component.