suiss/ui ยท Block
Signup Trial
A free trial signup split between a promotional image panel and a short form with a password strength meter.
Signup Trial 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 free trial signup that pairs a promotional image panel with a short form: email, password with a strength meter, and a terms checkbox. The submit button stays disabled until the form is valid. The panel sits beside the form on desktop and above it on mobile. Use it for trial, waitlist or account signups that need a sales pitch alongside.
Replace the promotional copy, the image constant and the success branch with your trial signup call. strength scores length, mixed case, a digit and a symbol, and the form needs 3 of 4, so tune it to your password policy. Point #sign-in at your sign-in page.
The strength meter exposes its level to screen readers. The promo panel is a CSS background image from Unsplash with no text alternative, so keep its copy meaningful.
Installation
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Usage
Web preview
A hero image sits above an InputAccessoryBar with email and password inputs; the password shows a five-level strength meter as you type. A Checkbox with a Label accepts the terms, and the Start free trial Button in the BottomBar stays disabled until the form is valid, then shows a welcome screen. A sign-in link sits below.
Replace IMAGE and the copy with your own. onSubmit receives the email and password, and onSignIn handles the sign-in link. The hero photo is an Unsplash placeholder.
Installation
The CLI also adds what it builds on: Bottom Bar, Button, Checkbox, Icon, Input Accessory Bar, Keyboard Scroll View, Label, Screen, Text. It also adds the animated view components/ui/animated-view.tsx.
- Install the following dependencies:
-
Add the pieces it builds on: Bottom Bar, Button, Checkbox, Icon, Input Accessory Bar, Keyboard Scroll View, Label, Screen, Text.
-
Copy the animated view into
components/ui/animated-view.tsx:
- Copy and paste the following code into
components/blocks/signup-trial.tsx:
- Update the import paths to match your project setup.
- Install the following dependencies:
-
Add the pieces it builds on: Bottom Bar, Button, Checkbox, Icon, Input Accessory Bar, Keyboard Scroll View, Label, Screen, Text.
-
Copy the animated view into
components/ui/animated-view.tsx:
- Copy and paste the following code into
components/blocks/signup-trial.tsx:
- Update the import paths to match your project setup.
- Install the following dependencies:
-
Add the pieces it builds on: Bottom Bar, Button, Checkbox, Icon, Input Accessory Bar, Keyboard Scroll View, Label, Screen, Text.
-
Copy the animated view into
components/ui/animated-view.tsx:
- Copy and paste the following code into
components/blocks/signup-trial.tsx:
- Update the import paths to match your project setup.
-
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.