suiss/ui · Block
Login Account
A two-step account sign-in form that asks for an email, then reveals a password field.
Login Account 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 sign-in form that asks for an email first, then reveals a password field below it. Errors appear inline and shake the fields, followed by a Remember me checkbox and links for a forgotten password and account creation. A successful sign-in shows a greeting with a Sign out link. Use it for any email-and-password login.
Installation
CLI
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Manual
- Install the dependencies:
-
Add the pieces it builds on: Avatar, Button, Checkbox, Input, Label, Spinner.
-
Copy the source into
components/blocks/login-account.tsx:
- Update the import paths to match your project.
Usage
Replace the second step of submit, which accepts any password of four or more characters after a delay, with your authentication call, and pass its error message to fail. Point the #forgot and #create links at your routes, and wire the Remember me checkbox, which is uncontrolled. Drop the greeting view if you redirect after login.
Notes
Inputs use the username and current-password autocomplete values so password managers work, and errors are tied to the fields and announced.

A sign-in screen inside a KeyboardScrollView. The email Input comes first; once a valid address is submitted, 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
The CLI also adds what it builds on: Avatar, Button, Checkbox, Icon, Input, Keyboard Scroll View, Label, Screen, Spinner, Text. On React Native it also adds the animated view components/ui/animated-view.tsx.
Manual
- Install the dependencies:
-
Add the pieces it builds on: Avatar, Button, Checkbox, Icon, Input, Keyboard Scroll View, Label, Screen, Spinner, Text, and the animated view
components/ui/animated-view.tsxfrom the next step. -
Copy the animated view into
components/ui/animated-view.tsx:
- Copy the source into
components/blocks/login-account.tsx:
- Update the import paths to match your project.
- Install the dependencies:
-
Add the pieces it builds on: Avatar, Button, Checkbox, Icon, Input, Keyboard Scroll View, Label, Screen, Spinner, Text, and the animated view
components/ui/animated-view.tsxfrom the next step. -
Copy the animated view into
components/ui/animated-view.tsx:
- Copy the source into
components/blocks/login-account.tsx:
- Update the import paths to match your project.
- Install the dependencies:
-
Add the pieces it builds on: Avatar, Button, Checkbox, Icon, Input, Keyboard Scroll View, Label, Screen, Spinner, Text, and the animated view
components/ui/animated-view.tsxfrom the next step. -
Copy the animated view into
components/ui/animated-view.tsx:
- Copy the source into
components/blocks/login-account.tsx:
- Update the import paths to match your project.
-
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.
- Set
minSdkto 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.
Usage
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.
