Forms for Angular and Ionic 2/3/4

Learn more

Form components you’ll need for building great looking mobile and desktop apps. Shipping 15 distinct elements ranging from inputs to layout helpers.

With useful features for a refined UX, including the following elements:

  • Single and multiline text
  • Select styling
  • Buttons
  • Segmented control
  • Checkbox and checklist
  • Radio buttons
  • Switch
  • Rating
  • Stepper
  • Page & typography
  • Slider
  • Progress
  • Alerts
  • Notifications
  • Notes


Forms demos available for other frameworks.

Viewing demos & code for

light
dark

Change the theme setting here

Forms - Mobile form

Change demo
Mobile form
Angular Single column mobile form example with field groups. Deliver different fields types with a consistent look & feel. For Angular 2/4/5/6/7 and Ionic 2/3/4.
import { Component } from '@angular/core';
import { MbscFormOptions } from '@mobiscroll/angular';

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})
export class AppComponent {
    formSettings: MbscFormOptions = {
        lang: '',
        theme: ''
    };
}
<mbsc-form [options]="formSettings">
    <mbsc-form-group>
        <mbsc-form-group-title>User Data</mbsc-form-group-title>
        <mbsc-input [(ngModel)]="firstname" placeholder="First Name">First Name</mbsc-input>
        <mbsc-input [(ngModel)]="lastname" placeholder="Last Name">Last Name</mbsc-input>
        <mbsc-input [(ngModel)]="username" placeholder="User Name">User Name</mbsc-input>
        <mbsc-input [(ngModel)]="company" placeholder="Company Name">Company</mbsc-input>
        <mbsc-input [(ngModel)]="email" placeholder="Email Address">Email</mbsc-input>
    </mbsc-form-group>
    <mbsc-form-group>
        <mbsc-form-group-title>Phone Number</mbsc-form-group-title>
        <mbsc-input [(ngModel)]="home" placeholder="Home">Home</mbsc-input>
        <mbsc-input [(ngModel)]="business" placeholder="Business">Business</mbsc-input>
        <mbsc-input [(ngModel)]="fax" placeholder="Fax">Fax</mbsc-input>
    </mbsc-form-group>
</mbsc-form>
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule, HttpClientJsonpModule } from '@angular/common/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MbscModule } from '@mobiscroll/angular';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    MbscModule,
    FormsModule,
    ReactiveFormsModule,
    HttpClientModule,
    HttpClientJsonpModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

Forms - Desktop form

Change demo
Desktop form
Angular Single and multi-column desktop form. Deliver different fields types with a consistent look & feel. For Angular 2/4/5/6/7 and Ionic 2/3/4.
import { Component } from '@angular/core';
import { MbscFormOptions } from '@mobiscroll/angular';

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})
export class AppComponent {
    multi: MbscFormOptions = {
        theme: '',
        lang: '',
        inputStyle: 'box',
        labelStyle: 'floating'
    };

    single: MbscFormOptions = {
        lang: '',
        theme: ''
    };
}
<mbsc-form [options]="multi">
    <div class="mbsc-grid mbsc-grid-fixed">
        <mbsc-form-group>
            <div class="mbsc-row mbsc-justify-content-center">
                <div class="mbsc-col-md-10 mbsc-col-xl-8 mbsc-form-grid">
                    <mbsc-form-group-title>Multiple columns grid</mbsc-form-group-title>
                    <div class="mbsc-row">
                        <div class="mbsc-col-md-6 mbsc-col-12">
                            <mbsc-input [(ngModel)]="email" placeholder="Email">Email</mbsc-input>
                        </div>
                        <div class="mbsc-col-md-6 mbsc-col-12">
                            <mbsc-input [(ngModel)]="password" placeholder="Password" [password-toggle]="true">Password</mbsc-input>
                        </div>
                    </div>
                    <div class="mbsc-row">
                        <div class="mbsc-col-12">
                            <mbsc-input [(ngModel)]="address" placeholder="Address">Address</mbsc-input>
                        </div>
                    </div>
                    <div class="mbsc-row">
                        <div class="mbsc-col-md-6 mbsc-col-12">
                            <mbsc-input [(ngModel)]="city" placeholder="City">City</mbsc-input>
                        </div>
                        <div class="mbsc-col-md-4 mbsc-col-6">
                            <mbsc-dropdown [(ngModel)]="state" label="State">
                                <option value="Alabama">Alabama</option>
                                <option value="Alaska">Alaska</option>
                                <option value="Arizona">Arizona</option>
                                <option value="Arkansas">Arkansas</option>
                                <option value="California">California</option>
                                <option value="Colorado">Colorado</option>
                                <option value="Connecticut">Connecticut</option>
                                <option value="Delaware">Delaware</option>
                                <option value="Florida">Florida</option>
                                <option value="Georgia">Georgia</option>
                                <option value="Hawaii">Hawaii</option>
                                <option value="Idaho">Idaho</option>
                                <option value="Illinois Indiana">Illinois Indiana</option>
                                <option value="Iowa">Iowa</option>
                                <option value="Kansas">Kansas</option>
                                <option value="Kentucky">Kentucky</option>
                                <option value="Louisiana">Louisiana</option>
                                <option value="Maine">Maine</option>
                                <option value="Maryland">Maryland</option>
                                <option value="Massachusetts">Massachusetts</option>
                                <option value="Michigan">Michigan</option>
                                <option value="Minnesota">Minnesota</option>
                                <option value="Mississippi">Mississippi</option>
                                <option value="Missouri">Missouri</option>
                                <option value="Montana Nebraska">Montana Nebraska</option>
                                <option value="Nevada">Nevada</option>
                                <option value="New Hampshire">New Hampshire</option>
                                <option value="New Jersey">New Jersey</option>
                                <option value="New Mexico">New Mexico</option>
                                <option value="New York">New York</option>
                                <option value="North Carolina">North Carolina</option>
                                <option value="North Dakota">North Dakota</option>
                                <option value="Ohio">Ohio</option>
                                <option value="Oklahoma">Oklahoma</option>
                                <option value="Oregon">Oregon</option>
                                <option value="Pennsylvania Rhode Island">Pennsylvania Rhode Island</option>
                                <option value="South Carolina">South Carolina</option>
                                <option value="South Dakota">South Dakota</option>
                                <option value="Tennessee">Tennessee</option>
                                <option value="Texas">Texas</option>
                                <option value="Utah">Utah</option>
                                <option value="Vermont">Vermont</option>
                                <option value="Virginia">Virginia</option>
                                <option value="Washington">Washington</option>
                                <option value="West Virginia">West Virginia</option>
                                <option value="Wisconsin">Wisconsin</option>
                                <option value="Wyomin">Wyomin</option>
                            </mbsc-dropdown>
                        </div>
                        <div class="mbsc-col-md-2 mbsc-col-6">
                            <mbsc-input [(ngModel)]="zip" placeholder="Zip">Zip</mbsc-input>
                        </div>
                    </div>
                    <mbsc-button>Sign in</mbsc-button>
                </div>
            </div>
        </mbsc-form-group>
    </div>
</mbsc-form>
<mbsc-form [options]="single">
    <div class="mbsc-grid">
        <div class="mbsc-row mbsc-justify-content-center">
            <div class="mbsc-col-sm-9 mbsc-col-md-7 mbsc-col-xl-5">
                <mbsc-form-group inset>
                    <mbsc-form-group-title>Single column grid</mbsc-form-group-title>
                    <mbsc-input [(ngModel)]="firstname" placeholder="First Name">First Name</mbsc-input>
                    <mbsc-input [(ngModel)]="lastname" placeholder="Last Name">Last Name</mbsc-input>
                    <mbsc-input [(ngModel)]="username" placeholder="User Name">User Name</mbsc-input>
                    <mbsc-input [(ngModel)]="company" placeholder="Company Name">Company</mbsc-input>
                    <mbsc-input [(ngModel)]="email" placeholder="Email Address">Email</mbsc-input>
                </mbsc-form-group>
            </div>
        </div>
    </div>
</mbsc-form>
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule, HttpClientJsonpModule } from '@angular/common/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MbscModule } from '@mobiscroll/angular';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    MbscModule,
    FormsModule,
    ReactiveFormsModule,
    HttpClientModule,
    HttpClientJsonpModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

Forms - Validation

Change demo
Validation
Angular Form validation example with required constraint and custom logic on input, select and various data types. For Angular 2/4/5/6/7 and Ionic 2/3/4.
import { Component, ViewChild } from '@angular/core';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { MbscFormOptions, MbscPopupOptions } from '@mobiscroll/angular';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html'
})
export class AppComponent {
  constructor(public fb: FormBuilder) {
    this.reactiveForm = fb.group({
      username: ['', [Validators.required, Validators.minLength(2)]],
      gender: ['', Validators.required],
      bio: ['', [Validators.required, Validators.minLength(20)]],
      email: ['', [Validators.required, Validators.email]],
      password: ['', [Validators.required, Validators.minLength(6)]]
    });
  }

  formSettings: MbscFormOptions = {
    lang: '',
    theme: ''
  };

  errorMessages = {
    username: {
      required: 'Username required',
      minlength: 'Has to be at least 2 characters'
    },
    gender: {
      required: 'Gender required'
    },
    bio: {
      required: 'Bio required',
      minlength: 'Don\'t be shy, surely you can tell more'
    },
    email: {
      required: 'Email address required',
      email: 'Invalid email address'
    },
    password: {
      required: 'Password required',
      minlength: 'At least 6 characters required'
    }
  };

  @ViewChild('thanks')
  thanksPopup: any;

  popupSettings: MbscPopupOptions = {
    theme: '',
    display: 'center',
    focusOnClose: false,
    buttons: [{
      text: 'Log in',
      handler: 'set'
    }]
  };

  // Template driven form
  @ViewChild('templateForm')
  templateForm: any;
  templateSubmitted = false;
  username = '';
  email = '';
  password = '';
  gender = '';
  bio = '';

  // Reactive Form
  reactiveForm: FormGroup;
  reactiveSubmitted = false;

  // Template Driven Form

  registerTempl() {
    this.templateSubmitted = true;
    if (this.templateForm && this.templateForm.valid && this.thanksPopup) {
      this.thanksPopup.instance.show();
    }
  }

  // Reactive Form

  getErrorState(field: string) {
    const ctrl = this.reactiveForm.get(field);
    return ctrl.invalid && this.reactiveSubmitted;
  }

  registerReact() {
    this.reactiveSubmitted = true;
    if (this.reactiveForm.valid && this.thanksPopup) {
      this.thanksPopup.instance.show();
    }
  }

  getErrorMessage(field: string, form: string) {
    const formCtrl = (form === 'reactive' ? this.reactiveForm : this.templateForm.control);
    let message = '';
    if (formCtrl) {
      const ctrl = formCtrl.get(field);
      if (ctrl && ctrl.errors) {
        for (const err in ctrl.errors) {
          if (!message && ctrl.errors[err]) {
            message = this.errorMessages[field][err];
          }
        }
      }
    }
    return message;
  }
}
<mbsc-form [options]="formSettings">
  <form novalidate #templateForm="ngForm">
    <mbsc-form-group>
      <mbsc-form-group-title>Sign Up - Template driven form</mbsc-form-group-title>
      <mbsc-input name="username" [(ngModel)]="username" #user="ngModel" [error]="user.invalid && templateSubmitted"
        [errorMessage]="getErrorMessage('username', 'template')" placeholder="Username" minlength="2" required
        icon="user4"></mbsc-input>
      <mbsc-input name="email" [(ngModel)]="email" #mail="ngModel" type="email" placeholder="Email" required email
        icon="ion-ios7-email" [error]="mail.invalid && templateSubmitted"
        [errorMessage]="getErrorMessage('email', 'template')"></mbsc-input>
      <mbsc-input name="password" [(ngModel)]="password" #pass="ngModel" type="password" placeholder="Password"
        minlength="6" required icon="lock2" password-toggle="true" [error]="pass.invalid && templateSubmitted"
        [errorMessage]="getErrorMessage('password', 'template')"></mbsc-input>
      <mbsc-dropdown name="gender" [(ngModel)]="gender" #gen="ngModel" required icon="user4"
        [error]="gen.invalid && templateSubmitted" [errorMessage]="getErrorMessage('gender', 'template')">
        <option value="">Please select</option>
        <option value="female">Female</option>
        <option value="male">Male</option>
      </mbsc-dropdown>
      <mbsc-textarea name="bio" [(ngModel)]="bio" #b="ngModel" required minlength="20"
        [error]="b.invalid && templateSubmitted" [errorMessage]="getErrorMessage('bio', 'template')"
        placeholder="About me" icon="line-note"></mbsc-textarea>
    </mbsc-form-group>
    <mbsc-form-group class="mbsc-btn-group-block">
      <mbsc-button type="submit" icon="checkmark" (click)="registerTempl()"
        [disabled]="templateForm.invalid && templateSubmitted">Sign Up</mbsc-button>
    </mbsc-form-group>
  </form>
</mbsc-form>
<mbsc-form [options]="formSettings">
  <form novalidate [formGroup]="reactiveForm">
    <mbsc-form-group>
      <mbsc-form-group-title>Sign Up - Reactive form</mbsc-form-group-title>
      <mbsc-input name="username" formControlName="username" placeholder="Username" icon="user4"
        [error]="getErrorState('username')" [errorMessage]="getErrorMessage('username', 'reactive')"></mbsc-input>
      <mbsc-input name="email" formControlName="email" type="email" placeholder="Email" icon="ion-ios7-email"
        [error]="getErrorState('email')" [errorMessage]="getErrorMessage('email', 'reactive')"></mbsc-input>
      <mbsc-input name="password" formControlName="password" type="password" placeholder="Password" icon="lock2"
        password-toggle="true" [error]="getErrorState('password')"
        [errorMessage]="getErrorMessage('password', 'reactive')"></mbsc-input>
      <mbsc-dropdown name="gender" formControlName="gender" required icon="user4" [error]="getErrorState('gender')"
        [errorMessage]="getErrorMessage('gender', 'reactive')">
        <option value="">Please select</option>
        <option value="femail">Female</option>
        <option value="male">Male</option>
      </mbsc-dropdown>
      <mbsc-textarea name="bio" formControlName="bio" [error]="getErrorState('bio')"
        [errorMessage]="getErrorMessage('bio', 'reactive')" placeholder="About me" icon="line-note"></mbsc-textarea>
    </mbsc-form-group>

    <mbsc-form-group class="mbsc-btn-group-block">
      <mbsc-button type="submit" icon="checkmark" (click)="registerReact()"
        [disabled]="reactiveForm.invalid && reactiveSubmitted">Sign Up</mbsc-button>
    </mbsc-form-group>
  </form>
</mbsc-form>

<mbsc-popup [options]="popupSettings" #thanks="mobiscroll">
  <h3>Thank you for registering</h3>
  <p>You have successfully signed up as a user!</p>
</mbsc-popup>
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule, HttpClientJsonpModule } from '@angular/common/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MbscModule } from '@mobiscroll/angular';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    MbscModule,
    FormsModule,
    ReactiveFormsModule,
    HttpClientModule,
    HttpClientJsonpModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

Forms - Create account

Change demo
Create account
Angular Signup screen with name, email and password and phone number fields. For Angular 2/4/5/6/7 and Ionic 2/3/4.
import { Component } from '@angular/core';
import { MbscFormOptions } from '@mobiscroll/angular';

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})
export class AppComponent {
    formSettings: MbscFormOptions = {
        lang: '',
        theme: ''
    };
}
<mbsc-form class="md-create-account" [options]="formSettings">
    <div class="md-chart-pic"></div>
    <div class="md-cac-title mbsc-padding">
        <h4>Great news, your traffic <br> is already being tracked</h4>
        <h4>Continue by creating a new account</h4>
    </div>
    <div class="md-cac-cont">
        <mbsc-form-group inset>
            <mbsc-input name="username" type="text" placeholder="Name"></mbsc-input>
            <mbsc-input name="email" type="email" placeholder="Email address"></mbsc-input>
            <mbsc-input name="password" type="text" placeholder="Password" password-toggle="true"></mbsc-input>
        </mbsc-form-group>
        <mbsc-form-group inset class="md-cac-btn">
            <mbsc-button type="submit" class="mbsc-btn-block">Create account</mbsc-button>
            <mbsc-button flat="true" class="mbsc-btn-block"> I'll do it later</mbsc-button>
        </mbsc-form-group>
    </div>
</mbsc-form>
.md-create-account {
    padding: 0 !important;
}

.md-create-account .md-cac-title {
    text-align: center;
    padding-bottom: 3em;
}

.md-create-account .md-cac-title,
.md-create-account .md-cac-cont {
    padding-top: 0;
}

.md-create-account .md-cac-cont {
    padding-bottom: 0;
}

.md-create-account .md-chart-pic {
    background-image: url("/content/img/demos/chart@1x.png");
    height: 150px;
    background-repeat: no-repeat;
    background-position: center;
}

@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 144dpi) {
    .md-create-account .md-chart-pic {
        background: url("/Content/img/demos/chart@2x.png") no-repeat center 12px;
        background-size: 109px 81px;
        background-position: center;
    }
}

.md-phone-num .mbsc-np-dsp {
    min-height: 25px;
    -webkit-box-sizing: content-box;
    -moz-box-sizing: content-box;
    box-sizing: content-box;
}
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule, HttpClientJsonpModule } from '@angular/common/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MbscModule } from '@mobiscroll/angular';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    MbscModule,
    FormsModule,
    ReactiveFormsModule,
    HttpClientModule,
    HttpClientJsonpModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

Forms - Sign up

Change demo
Sign up
Angular Signup and register form with name, email and password fields, featuring framework specific validation. For Angular 2/4/5/6/7 and Ionic 2/3/4.
import { Component } from '@angular/core';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import { MbscFormOptions } from '@mobiscroll/angular';

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})
export class AppComponent {

    constructor(private formBuilder: FormBuilder) {
        this.form = formBuilder.group({
            username: ['', [Validators.required, Validators.minLength(4)]],
            email: ['', [Validators.required, Validators.email]],
            password: ['', [Validators.required, Validators.pattern('(?=.*[a-z])(?=.*[A-Z]).{6,}')]]
        });
    }

    form: FormGroup;
    formSettings: MbscFormOptions = {
        lang: '',
        theme: ''
    };

    errorMessages = {
        username: {
            required: 'Name required',
            minlength: 'Please enter at least 4 characters.'
        },
        email: {
            required: 'Email required',
            email: 'Invalid email address'
        },
        password: {
            required: 'Password required',
            pattern: 'Invalid, please see rules'
        }
    };

    triedToSubmit = false;

    submit() {
        this.triedToSubmit = true;
        if (this.form.invalid) {
            const controls = this.form.controls;
            for (const control in controls) {
                if (controls[control]) {
                    controls[control].markAsDirty();
                    controls[control].markAsTouched();
                }
            }
        }
    }

    errorFor(field: string) {
        const control = this.form.controls[field];
        for (const validator in control.errors) {
            if (control.errors[validator]) {
                return this.errorMessages[field][validator];
            }
        }
        return null;
    }
}
<mbsc-form [options]="formSettings" class="md-signup-rules">
    <form [formGroup]="form" (ngSubmit)="submit()" novalidate>
        <mbsc-form-group inset>
            <mbsc-form-group-title>Sign Up</mbsc-form-group-title>
            <mbsc-input name="username" formControlName="username" [error]="form.controls['username'].invalid && form.controls['username'].dirty && form.controls['username'].touched" [errorMessage]="errorFor('username')" placeholder="Name">Name</mbsc-input>
            <mbsc-input name="email" formControlName="email" [error]="form.controls['email'].invalid && form.controls['email'].dirty && form.controls['email'].touched" [errorMessage]="errorFor('email')" placeholder="Email">Email</mbsc-input>
            <mbsc-input name="password" formControlName="password" [error]="form.controls['password'].invalid && form.controls['password'].dirty && form.controls['password'].touched" [errorMessage]="errorFor('password')" password-toggle="true" placeholder="Password">Password</mbsc-input>
        </mbsc-form-group>
        <mbsc-form-group inset>
            <div class="mbsc-padding">
                <h6>Use lowercase and uppercase characters </h6>
                <h6>Length of password should be at least 6 characters</h6>
            </div>
            <div class="mbsc-padding">
                <mbsc-button block [disabled]="form.invalid && triedToSubmit" type="submit">Sign Up</mbsc-button>
            </div>
        </mbsc-form-group>
    </form>
</mbsc-form>
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule, HttpClientJsonpModule } from '@angular/common/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MbscModule } from '@mobiscroll/angular';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    MbscModule,
    FormsModule,
    ReactiveFormsModule,
    HttpClientModule,
    HttpClientJsonpModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

Forms - Log in

Change demo
Log in
Angular Login form with email and password fields, forgot password link and framework specific validation. For Angular 2/4/5/6/7 and Ionic 2/3/4.
import { Component } from '@angular/core';
import { mobiscroll, MbscFormOptions } from '@mobiscroll/angular';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html'
})
export class AppComponent {

  constructor(private fb: FormBuilder) {
    this.loginForm = fb.group({
      email: ['', [Validators.required, Validators.email]],
      password: ['', [Validators.required, Validators.minLength(6)]]
    });
  }

  loginForm: FormGroup;

  isLogin = false;
  attemptedSubmit = false;

  formSettings: MbscFormOptions = {
    lang: '',
    theme: ''
  };

  errorMessages = {
    required: '{$1} required',
    minlength: 'At least 6 characters required',
    email: 'Invalid email address'
  };

  markFieldsDirty() {
    const controls = this.loginForm.controls;
    for (const field in controls) {
      if (controls[field]) {
        controls[field].markAsDirty();
      }
    }
  }

  signUp() {
    this.attemptedSubmit = true;
    if (this.loginForm.valid) {
      mobiscroll.toast({
        message: 'Signed Up!',
        callback: () => {
          this.loginForm.reset();
          this.attemptedSubmit = false;
        }
      });
    } else {
      this.markFieldsDirty();
    }
  }

  logIn() {
    this.attemptedSubmit = true;
    if (this.loginForm.valid) {
      mobiscroll.toast({
        message: 'Logged In!',
        callback: () => {
          this.loginForm.reset();
          this.attemptedSubmit = false;
        }
      });
    } else {
      this.markFieldsDirty();
    }
  }

  errorFor(fieldName: string) {
    const field = this.loginForm.controls[fieldName];
    for (const validator in field.errors) {
      if (field.errors[validator]) {
        const friendlyName = fieldName.charAt(0).toUpperCase() + fieldName.slice(1);
        return this.errorMessages[validator].replace('{$1}', friendlyName);
      }
    }
    return null;
  }

}
<mbsc-form class="md-login-form" [options]="formSettings">
  <form [formGroup]="loginForm" novalidate>
    <div class="md-logo micons icon-mbsc-logo"></div>
    <mbsc-form-group inset>
      <mbsc-input formControlName="email" name="Email" placeholder="Email"
        [error]="loginForm.controls['email'].invalid && loginForm.controls['email'].dirty"
        [errorMessage]="errorFor('email')">
      </mbsc-input>
      <mbsc-input formControlName="password" name="password" type="text" placeholder="Password" password-toggle="true"
        icon="none" icon-align="right"
        [error]="loginForm.controls['password'].invalid && loginForm.controls['password'].dirty"
        [errorMessage]="errorFor('password')"></mbsc-input>
    </mbsc-form-group>
    <mbsc-form-group inset class="mbsc-padding mbsc-align-center">
      <a href="#" *ngIf="isLogin" (click)="isLogin = false">Don't have an account yet? Sign up.</a>
      <a href="#" *ngIf="!isLogin" (click)="isLogin = true">Already have an account?</a>
      <br><br>
      <a href="#">Forgot password?</a>
    </mbsc-form-group>
    <mbsc-form-group inset class="mbsc-padding">
      <mbsc-button block *ngIf="isLogin" [disabled]="loginForm.invalid && attemptedSubmit" (click)="logIn()">Sign in
      </mbsc-button>
      <mbsc-button block *ngIf="!isLogin" [disabled]="loginForm.invalid && attemptedSubmit" (click)="signUp()">Sign up
      </mbsc-button>
    </mbsc-form-group>
  </form>
</mbsc-form>
.md-login-form .md-logo {
    display: inline-block;
    width: 100%;
    font-size: 80px;
    text-align: center;
    height: 46px;
    margin: 130px 0 30px 0;
    color: #1c75bc;
}
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule, HttpClientJsonpModule } from '@angular/common/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MbscModule } from '@mobiscroll/angular';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    MbscModule,
    FormsModule,
    ReactiveFormsModule,
    HttpClientModule,
    HttpClientJsonpModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

Looking for something you didn't see or have a sales question?
Ask us about it, we're here to help.

Component license


Purchase component licenses if you are looking for specific funcionality.

Total


All features will be included with the license.

Buy component license

Framework license


Get all 36 components, including with the Framework license.



Mobiscroll for Angular & Ionic $595


Use Javascript when building with plain and simple JS. Use jQuery when you have jQuery already included or if you are building with jQuery Mobile. Use AngularJS when building with Angular 1.x or Ionic 1. Use Angular when building with Angular 2/4/5/6/7 or Ionic 2/3/4. Use it when you are building your app or website with React.


Buy framework license
See other licensing options

Framework license


Get all 36 components, including with the Framework license.



Mobiscroll for Angular $595


  • Use it when building with plain and simple JS
  • Compatible with vanilla JS app or frameworks like Vue
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with jQuery and jQuery Mobile
  • Enjoy the familiar API if you already use jQuery
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular JS and Ionic 1
  • For web and mobile apps based on Angular 1.x
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular 2/4/5/6/7 and Ionic 2/3/4
  • Visual Studio and VS Code integration
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it when building with React JS
  • Collection of UI components for web and mobile
  • Royalty-free commercial usage
  • Technical support is included with the license
Buy framework license
See other licensing options

Framework license


Select the development framework you are using. Get all 36 components with the license.

Mobiscroll for Javascript
Mobiscroll for jQuery
Mobiscroll for React
Mobiscroll for Angular
Mobiscroll for Angular JS
  • Use it when building with plain and simple JS
  • Compatible with vanilla JS app or frameworks like Vue
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with jQuery and jQuery Mobile
  • Enjoy the familiar API if you already use jQuery
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular JS and Ionic 1
  • For web and mobile apps based on Angular 1.x
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular 2/4/5/6/7 and Ionic 2/3/4
  • Visual Studio and VS Code integration
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it when building with React JS
  • Collection of UI components for web and mobile
  • Royalty-free commercial usage
  • Technical support is included with the license
Buy framework license
See other licensing options

Select the framework you are interested in

Javascript
jQuery
Angular
Angular JS
React

Use Javascript when building with plain and simple JS.

Use jQuery when you have jQuery already included or if you are building with jQuery Mobile.

Use AngularJS when building with Angular 1.x or Ionic 1.

Use Angular when building with Angular 2/4/5/6/7 or Ionic 2/3/4.

Use it when you are building your app or website with React.

Do you need additional support seats?

The framework license comes with one support seat. ( +$50/seat )

Add the source code?

Price
Buy now
Customize & try demos locally
Sign in or start your free trial

What framework are you using?

Javascript
jQuery
AngularJS
Angular
Ionic
React
Other
Select a framework
Email address

Customize & try this demo locally
Sign in or start your free trial

We have to set you up with a trial for this to run 👍

Email address

Customize & try demos locally
You can download and use Mobiscroll for Free

What framework are you using?

Javascript
jQuery
AngularJS
Angular
Ionic
React
Other
Select a framework
Install demo in your app
Follow this quick, two minute install guide
Close window

Step 1.Install the Mobiscroll CLI from npm

Copy command
$ npm install -g @mobiscroll/cli

The CLI makes configuring your apps super simple 👍

Step 2.Run the following command in the root folder of your Ionic project

Copy command
$ mobiscroll config ionic
$ mobiscroll config ionic --lite

You will be prompted to log in with your mobiscroll account. Set your password here

Create an Ionic 3 & Mobiscroll starter with the CLI:

$ mobiscroll start ionic myStarter

Run this command for Ionic 4 & Mobiscroll starter:

$ mobiscroll start ionic-angular myStarter

Step 3.Copy the code into your app.

Copy TS
Copy HTML
Copy CSS
Copy Module

Step 4.Run ionic serve in the root folder of your app 🎉

Copy command
$ ionic serve

And voilà, everything should be running smoothly.

Customize & try demos locally
How would you like to do it?
Install demo in your app
Follow this quick, two minute install guide
Close window

Step 1.Install the Mobiscroll CLI from npm

Copy command
$ npm install -g @mobiscroll/cli

The CLI makes configuring your apps super simple 👍

Step 2.Run the following command in the root folder of your Angular project

Copy command
$ mobiscroll config angular
$ mobiscroll config angular --lite

You will be prompted to log in with your mobiscroll account. Set your password here

Step 3.Copy the code into your app. HTML goes into the markup, TS into Typescript.

Copy TS
Copy HTML
Copy CSS
Copy Module

Step 4.Run ng serve in the root folder of your app 🎉

Copy command
$ ng serve

And voilà, everything should be running smoothly.

Thanks for downloading
Try and customize the app locally

Extract the zip file and run the project like any Ionic app. Make sure to have Ionic CLI installed and open the terminal in the app root folder.

Step 1. Run in root folder
$ npm install
Step 2. Start the app
$ ionic serve

Let us know if we can help and enjoy!

Change your password
Need to update your password? Enter and hit the button below

You are setting a password for the account

New Password Required Enter at least 6 characters
Change your password
Need to update your password? Enter and hit the button below

Your password has been changed!

Thanks for downloading
Customize demos locally

Everything is set up so that you can dig in right away and start exploring.

Please extract the zip file and simply open the demos in your favorite browser. For instructions on how to install Mobiscroll in your project follow this guide.


Let us know if we can help and enjoy!

Thanks for downloading
Customize demos locally

Please extract the zip file and run the project like any Angular CLI app. Make sure to have the Angular CLI installed.

For installation and usage, extract the zip file and open a terminal window and follow these steps.

Step 1. Run in root folder
$ npm install
Step 2. Start the app
$ ng serve --open

Let us know if we can help and enjoy! 👍

Thanks for downloading
Customize demos locally

Everything is set up so that you can dig in right away and start exploring.

We have set up a trial so that you can try the demos locally.

The easiest way to get started is to follow the installation steps and by grabbing the code directly from the demo page. Let us know if we can help and enjoy!

You'll find a fully functional Kitchen-sink Ionic app in the zip file.

Thanks for downloading
Customize demos locally

The demos are using Babel's in-browser ES6 and JSX transformer.

Please extract the zip file and open the demos in your browser. For instructions on how to install Mobiscroll in your project follow this guide.


Let us know if we can help and enjoy!

Demos
Alerts & notifications
Alert Notifications Note
Components
Alerts & notifications 3
Buttons 4
Calendar 27
Cards 14
Collapsible 3
Color 10
Date & Time 20
Event Calendar 25
Forms 6
Grid layout 7
Image 7
Inputs & fields 6
Listview 18
Measurement 10
Navigation 8
Number 8
Numpad 13
Option List 4
Popup 10
Range 19
Scroller 7
Scrollview 5
Select 18
Slider & progress 4
Styling 6
Timer 5
Timespan 6
Toggle & Radio 4
Treelist 7
Theme Select
Mobiscroll
Mobiscroll Dark
Material
Material Dark
iOS
iOS Dark
Windows
Windows Dark
Display Mode
Language Locale
See other demos and change options
Theme
Display
Locale
See other demos