suiss/uim · Block

Login Sheet

A sign-in screen whose primary button opens a bottom sheet to share or hide your email.

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

An app welcome screen with two buttons: Sign in with suiss and Continue with email. The first opens a Drawer that shows the account name and a RadioGroup to share the real email or use a hidden forwarding address, with a Continue Button that shows a Spinner before closing the sheet and showing a welcome message.

Installation

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

The CLI also adds what it builds on: Button, Drawer, Icon, Radio Group, Screen, Spinner, Text.

Manual

  1. Install the dependencies:
npx expo install cn phosphor-react-native react-native-svg
  1. Add the pieces it builds on: Button, Drawer, Icon, Radio Group, Screen, Spinner, Text.

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

uniwind/components/blocks/login-sheet.tsx
import { cn } from "cn"
import { EnvelopeSimpleIcon, UserIcon, XIcon } from "phosphor-react-native"
import * as React from "react"
import { Pressable, View } from "react-native"
import { Button } from "@/components/ui/button"
import {
  Drawer,
  DrawerClose,
  DrawerContent,
  DrawerTitle,
} from "@/components/ui/drawer"
import { Icon } from "@/components/ui/icon"
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"
import { Screen } from "@/components/ui/screen"
import { Spinner } from "@/components/ui/spinner"
import { Text } from "@/components/ui/text"
  1. Update the import paths to match your project.

Usage

import { LoginSheet } from "@/components/blocks/login-sheet"
<LoginSheet />

Edit EMAIL_OPTIONS to change the email choices. Wire onContinue (receives share or hide) to your sign-in flow and onContinueWithEmail to your email sign-up screen.