Home / Blog / How to create a Sign-Up screen

How to create a Sign-Up screen

Ionic Design Kit, built on a design base of Ionic Framework components, simplifies app development by providing designers with a range of pre-made elements. Designers can effortlessly pick and place elements, eliminating the need to create components from scratch. For developers, this means no complex coding – all components are sourced from the Ionic Framework. The result is a speedy, efficient, and collaborative process, making the Ionic Design Kit essential for both designers and developers.

The Sign-up/Register screen serves as the initial touchpoint, offering users their first glimpse into the application's aesthetics and functionality. This introductory interaction significantly influences user satisfaction and retention, underscoring the importance of dedicating attention to its design and usability.

This article explores the essential aspects of developing a compelling Sign up/Register screen, emphasizing the need for a user-centric approach. Utilizing the Ionic Design Kit as a foundation, we streamline the process of incorporating pre-made elements, facilitating a collaborative and efficient journey for both designers and developers. This guide aims to provide step-by-step instructions, ensuring a seamless integration of design within the code based on Ionic development framework. Elevate your user onboarding experience by mastering the art of creating an impactful Sign up/Register screen that goes beyond mere functionality, leaving an indelible mark on users' initial interactions with your application.

1. Install Ionic CLI with command

Creating a project with the Ionic CLI

npm i -g @ionic/cli

2. Create a new project

To create a new project, run the following command.

ionic start sign-up-form blank --type=react

3. Get inside the project directory

cd sign-up-form

4. Create a new page

Create page SignUp.tsx inside src/pages and add code.

import { IonPage } from '@ionic/react';

const SignUp: React.FC = () => {
   return (
     <IonPage></IonPage>
   );
};

export default SignUp;

Please make sure that you've added routing in src/App.txs for the created page. All Ionic framework components that will be used below should be imported similarly to the IonPage component.

5. Add the header

For convenience, we will be using the layout structure recommended by Ionic for all our screens. This allows us to add header code and content inside the <IonPage></IonPage>.

<IonHeader>
  <IonToolbar>
    <IonTitle>Logotype</IonTitle>
  </IonToolbar>
  <IonContent className='ion-padding'>
  ...
  </IonContent>
</IonHeader>

6. Create a line break and add a heading

Inside the IonContent component, add the <br /> tag to create a line break between components.

7. Add the heading

Next add the IonText component with class ion-text-center within the IonContent section. This will apply styling to the content within the IonText, providing centering the text according to Ionic's guidelines. Inside the IonText component, include an h1 element with the text "Create account".

<IonContent className='ion-padding'>
  <br />
  <IonText className='ion-text-center'>
    <h1>Create account</h1>
  </IonText>
</IonContent>

8. Add the registration form

Next, within the IonContent section, add a <form> tag to encapsulate the registration form.

<IonContent className='ion-padding'>
  <br />
  <IonText className='ion-text-center'>
    <h1>Create account</h1>
  </IonText>

  <form action="#"></form>
</IonContent>   

9. Organize the space for input fields

Within the form, include the IonList component with the ion-margin-bottom class to organize the input fields for email, password, and confirmation password.

<form action="#">
  <IonList className='ion-margin-bottom'>
            
  </IonList>
</form>

10. Customize the styling

Within the IonList component, include the IonItem component with the class ion-no-padding.

<form action="#">
  <IonList className='ion-margin-bottom'>
   <IonItem className='ion-no-padding'>
              
    </IonItem>
  </IonList>
</form>

This utilizes IonItem with the ion-no-padding class inside IonList, allowing you to customize the styling of the email input field without additional padding.

11. Place the email input

Inside the IonItem component, place the IonInput component for entering the email. Add the label E-mail, set the label placement as floating, and specify the input type as email.

<IonItem className='ion-no-padding'>
  <IonInput
    label='E-mail'
    labelPlacement='floating'
    type='email'
  ></IonInput>
</IonItem>

This incorporates an IonInput field for entering the email with a floating label specifying E-mail and a type attribute set to email.

12. Add the password input

Within the IonList component, add another IonItem for the password input. Set the label to Password, define the label placement as floating, and specify the input type as password.

<IonItem className='ion-no-padding'>
  <IonInput
    label='Password'
    labelPlacement='floating'
    type='password'
  ></IonInput>
</IonItem>

13. Repeat the previous step for the confirmation password field

Ensure to set the label attribute as Confirm your password.

<IonItem className='ion-no-padding'>
  <IonInput
    label='Confirm your password'
    labelPlacement='floating'
    type='password'
  ></IonInput>
</IonItem>

14. Add the checkbox

After the IonList component, place an IonCheckbox with the text I agree with the Privacy Policy and className='ion-margin-bottom' to it. Define the label placement as end to position the text on the right. You can use the IonRouterLink component to navigate to another page.

<form action="#">
  <IonList className='ion-margin-bottom'>
    ...
  </IonList>
    <IonCheckbox labelPlacement='end' className='ion-margin-bottom'>
      I agree with the
    <IonRouterLink href='#'> Privacy Policy</IonRouterLink>
  </IonCheckbox>
</form>

15. Add the Submit button

Below, position an IonButton with the text "Sign up", setting its type as submit and adding expand='block', and className='ion-margin-bottom.

<IonButton
  expand='block'
  type='submit'
  className='ion-margin-bottom'
>
    Sign up
</IonButton>

16. Add the content

Next, utilize the IonText component with the class ion-text-center and color='medium' to display the text "or" in a paragraph format with a medium color, centered within the line.

<form action="#">
  ...
</form>
<IonText color='medium' className='ion-text-center'>
  <p>or</p>
</IonText>

17. Organize the registration buttons

Next, add the IonList component to organize the registration buttons for Apple and Google.

<IonList className='ion-margin-bottom'></IonList>

18. Import logos

Use Ionicons to include logos for Apple and Google on the registration buttons. Import the icons using the following.

import { logoApple, logoGoogle } from 'ionicons/icons';

19. Place the signing buttons

Inside the IonList, place an IonButton for signing in with Apple. Use the following code as a template.

<IonButton fill='outline' expand='block'>
  <IonIcon slot='start' icon={ logoApple }></IonIcon>
  Sign up with Apple
</IonButton>

This IonButton is configured with outline fill, expanding to the full width of its container, and includes the IonIcon for the Apple logo on the left.

20. Add the registration button

Similarly, add the IonButton for registering in with Google below.

<IonButton fill='outline' expand='block'>
  <IonIcon slot='start' icon={ logoGoogle }></IonIcon>
  Sign up with Google
</IonButton>

21. Add more content

After the IonList component, add the <br /> tag to create a line break between components and add the IonText component within the IonContent section. You can use the IonRouterLink component to navigate to another page.

<IonText color='medium' className='ion-text-center'>
  <p>
    Do you have an account?
    <IonRouterLink href='#'>Sign in</IonRouterLink>
   </p>
</IonText>

Thank you for joining us on this exciting journey thus far. Stay tuned for more guides in our comprehensive series, where we'll not only delve into various aspects of mobile app development but also showcase how the Ionic Kit can be your game-changer.

Are you prepared to elevate your Ionic experience? Explore the advantages of incorporating the Ionic Design Kit for intuitive designs and seamless development. May your coding journey be marked by continual innovation and triumphant achievements!

Looking for Ionic kit for you platform?
Ionic Sketch
Ionic Figma
Ionic XD