suiss/ui ยท Block
Login Sheet
A mobile app welcome screen with a Sign in with suiss bottom sheet for sharing or hiding an email.
Login Sheet is an open-source block from suiss/ui for React, React Native, SwiftUI and Jetpack Compose. The @esuiss/ui CLI copies its source into your project, so you own the code.
A mobile app welcome screen whose Sign in with suiss button slides up a bottom sheet, where users choose to share or hide their email before continuing. Completing the flow greets the user with a Sign out link. From small tablets up the screen sits in a phone frame; on the smallest screens it fills the section. Use it for third-party sign-in or any consent step shown as a bottom sheet.
Replace proceed, which fakes a one-second request, with your identity provider's sign-in, and send the chosen email option along. Update the Trail Routes app name, tagline and account details, and give Continue with email a handler.
The sheet behaves as a modal dialog: focus moves into it, Escape or a click on the scrim closes it, and focus returns to the trigger.
Installation
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
- Install the following dependencies:
-
Add the pieces it builds on: Button, Label, Radio Group, Spinner.
-
Copy and paste the following code into your project.
- Update the import paths to match your project setup.
Usage
Web preview
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.
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.
Installation
-
Target iOS 17 or later.
-
Add the Swift package to your app:
- Copy the theme files every view uses:
- Copy the source and every file it uses:
- Add the files to your app target.
- Apply the Compose compiler plugin, enable Compose, set
compileSdkto 37 or higher andminSdkto 24 or higher, and add the dependencies:
- Copy the theme files every view uses:
- Copy the source and every file it uses:
- Update the
com.esuiss.uipackage names to match your project.