Home / Blog / How to create a Loan application screen

How to create a Loan application 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 Loan Application Screen is a vital feature in fintech and banking apps, enabling users to calculate EMIs (Equated Monthly Installments) and submit loan applications with ease. A well-designed screen includes components like loan amount sliders, interest rate inputs, tenure selectors, auto-calculated EMI output, and a streamlined submission form. This combination helps users understand loan terms clearly while simplifying the application process.

This guide will walk you through the steps to design and implement a Loan Application Screen using the Ionic Design Kit. By leveraging its interactive UI elements and the Ionic Framework, you can create a smooth, transparent, and user-friendly loan experience that builds trust and encourages conversions.

1. Install Ionic CLI with the 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 loan blank --type=react

3. Get inside the project directory

cd loan

4. Create a Loan application page

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

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

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

export default Loan;

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

5. Select the layout structure

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

<IonPage>
  <IonHeader>
    <IonToolbar>
    ... 
    </IonToolbar>
  </IonHeader>
  <IonContent>
  ... 
  </IonContent>
  <IonFooter>
  ... 
  </IonFooter>
</IonPage>

6. Import necessary components and setup state

At the top of your file, import all necessary components from Ionic and set up state management for the loan application progress.

import React, { useState } from 'react';
import {
  IonPage,
  IonHeader,
  IonToolbar,
  IonButtons,
  IonButton,
  IonIcon,
  IonContent,
  IonText,
  IonFooter,
  IonGrid,
  IonRow,
  IonCol,
} from '@ionic/react';
import { arrowBack, keypad } from 'ionicons/icons';

const Loan: React.FC = () => {
  const [progress, setProgress] = useState(0.2);
  
  return (
    <IonPage>
    ...
    </IonPage>
  );
};

The progress state variable is initialized at 0.2 (20%) to indicate that this is an early step in the loan application process.

7. Add the header with navigation buttons

Inside the IonToolbar, place navigation buttons at both ends. Add IonButtons with slot="start" containing a back button with the arrow icon. On the right side, add another IonButtons with slot="end" containing a text-only Cancel button. Both buttons use the primary color for consistency.

<IonHeader>
  <IonToolbar>
    <IonButtons slot="start">
      <IonButton color="primary">
        <IonIcon icon={arrowBack}/>
      </IonButton>
    </IonButtons>
    <IonButtons slot="end">
      <IonButton color="primary">
        Cancel
      </IonButton>
    </IonButtons>
  </IonToolbar>
</IonHeader>

8. Add a progress indicator bar

Beneath the toolbar in the IonHeader, add an IonProgressBar component to visually indicate the user's position in the multi-step loan application process. Set the value property to the progress state variable, which is initialized at 0.2 (20%), showing that this is an early step in the process. The progress bar appears as a thin line spanning the full width of the screen, providing subtle but important user feedback.

<IonHeader>
  <IonToolbar>
  ...
  </IonToolbar>
  <IonProgressBar value={progress}/>
</IonHeader>

The default color of the progress bar matches the application's primary theme color, maintaining visual consistency throughout the interface.

9. Display the loan amount with keypad button

Create a row layout using IonGrid, IonRow, and IonCol to display the loan amount and keypad button side by side. Set ion-justify-content-between on the row to space elements at opposite ends, and ion-align-items-center to vertically center them. The left column shows the amount '$2,500' in an <h2> tag, while the right column contains a round light-colored button with a keypad icon.

<IonContent>
  ...

  <IonGrid style={{ padding: '0px' }} className='ion-margin-bottom'>
    <IonRow className='ion-justify-content-between ion-align-items-center'>
      <IonCol size='auto' style={{ padding: '0px' }}>
        <IonText>
          <h2>$2,500</h2>
        </IonText>
      </IonCol>
      <IonCol size='auto' style={{ padding: '0px' }}>
        <IonButton color='light' shape='round'>
          <IonIcon slot='icon-only' icon={keypad}/>
        </IonButton>
      </IonCol>
    </IonRow>
  </IonGrid>
</IonContent>

Both columns use size='auto' to take only the space needed for their content.

10. Add informational note about account limits

Below the amount section, include a small informational note using IonText with color='medium'. Style it with a smaller font size and left alignment to differentiate it from the centered content above. This provides important account limitation information to the user.

<IonText 
  color='medium' 
  style={{ fontSize: '12px', textAlign: 'left' }}
>
  <p>Please note: Your GBP account can only hold up to $4500 at any time.</p>
</IonText>

At the bottom of the page, place an IonFooter with a full-width Continue button. Use className='ion-no-border ion-padding ion-margin-bottom' to remove the default border, add padding around all sides, and provide bottom margin space. The button uses expand='block' to fill the available width.

<IonFooter className='ion-no-border ion-padding ion-margin-bottom'>
  <IonButton expand='block'>Continue</IonButton>
</IonFooter>

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