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

Easily create single column layouts and render mobile forms using the various form elements like buttons, inputs, sliders, radio buttons and more.

Use the global settings to set the theme, localization options and everything that should be the same across your app.

Building for larger screens?  See how to make forms for tablets & desktops →
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

Use the grid layout to create single and multiple column forms suited for medium and large screens. Don't go overboard with too many columns but make use of the available horizontal space on bigger screens.

Use the global settings for setting the theme, localization options and everything that should be consistent across your app.

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 - Responsive form

Change demo
Responsive form
Responsive Angular form using grid layout. Define how the form elements behaves across multiple screen sizes. For Angular 2/4/5/6/7/8 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" class="mbsc-form-grid">
    <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-align-center">
                <mbsc-note color="primary">Create responsive forms with the help of the grid layout.</mbsc-note>
            </div>
        </div>
        <div class="mbsc-row">
            <div class="mbsc-col-12 mbsc-col-md-6 mbsc-col-lg-3">
                <mbsc-input input-style="box" label-style="floating" placeholder="Enter your email address">Email</mbsc-input>
            </div>
            <div class="mbsc-col-12 mbsc-col-md-6 mbsc-col-lg-3">
                <mbsc-input input-style="box" label-style="floating" placeholder="Set a password" password-toggle="true">Password</mbsc-input>
            </div>
            <div class="mbsc-col-12 mbsc-col-lg-6">
                <mbsc-input input-style="box" label-style="floating" placeholder="What is your address?">Address</mbsc-input>
            </div>
        </div>
        <div class="mbsc-row">
            <div class="mbsc-col-12 mbsc-col-md-6 mbsc-col-lg-3">
                <mbsc-input input-style="box" label-style="floating" placeholder="Enter your town">Town</mbsc-input>
            </div>
            <div class="mbsc-col-12 mbsc-col-md-6 mbsc-col-lg-3">
                <mbsc-input input-style="box" label-style="floating" placeholder="Select your state">State</mbsc-input>
            </div>
            <div class="mbsc-col-12 mbsc-col-md-6 mbsc-col-lg-3">
                <mbsc-input input-style="box" label-style="floating" placeholder="What is your zip code">Zip</mbsc-input>
            </div>
            <div class="mbsc-col-12 mbsc-col-md-6 mbsc-col-lg-3">
                <mbsc-input input-style="box" label-style="floating" placeholder="Select your country">Country</mbsc-input>
            </div>
        </div>
        <div class="mbsc-row">
            <div class="mbsc-col-12 mbsc-col-md-16 mbsc-col-lg-3">
                <div class="mbsc-btn-group-block">
                    <mbsc-button mbsc-button color="success">Create account</mbsc-button>
                </div>
            </div>
        </div>
        <div class="mbsc-row mbsc-justify-content-center">
            <div class="mbsc-col-sm-9 mbsc-col-md-7 mbsc-col-xl-5">
                <mbsc-note color="secondary">
                    <p class="mbsc-align-left">Use the grid layout classes to set how the form should look on different screen sizes.</p>
                    <ul class="mbsc-align-left">
                        <li>The column widths will adapt to the screen size based on the predefined <b>.mbsc-col-{{ '{' }}breakpoint{{ '}' }}-{{ '{' }}size{{ '}' }}</b> classes and become horizontal at the specified breakpoint.</li>
                        <li>The examples are using the <b>.mbsc-col-md-6</b>, <b>.mbsc-col-lg-6</b> and <b>.mbsc-col-lg-3</b> classes.</li>
                    </ul>
                </mbsc-note>
            </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 - Custom usage

Change demo
Custom usage

While using mobiscroll forms on its own is great and easy there are a lot of cases where a mixed solution is required. There are three common approaches we came across that are covered by this example.

  • Use mobiscroll form elements inside your existing forms. This is a common scenario that you can come across. Your page is already functional, designed and you would like to update/change a single piece or add something new. Use a stand-alone element like the mbsc-switch in the example.
  • Use custom styled elements inside mobiscroll forms. Let's say you mostly use mobiscroll on your pages and forms but you also have custom components that you'd like to apply. In that case you want to turn all enahncements off for that element with the the data-enhance="false" property.
  • Use mobiscroll form elements outside of an actual form. Also a common use case, think of some content like a couple paragraphs and a subscribe call to action in the middle. Use the stand-alone controls, like mbsc-input and mbsc-button elements.
import { Component } from '@angular/core';
import { mobiscroll, MbscFormOptions } from '@mobiscroll/angular';

mobiscroll.settings = {
    lang: '',
    theme: ''
};

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})
export class AppComponent {
    agree1 = false;
    agree2 = false;
}
<div class="mbsc-grid mbsc-grid-fixed md-custom-usage">
    <div class="mbsc-row mbsc-justify-content-center">
        <div class="mbsc-col-md-10 mbsc-col-xl-9">
            <h4>Using elements inside existing forms</h4>
            <form class="custom-form">
                <div class="mbsc-row">
                    <div class="mbsc-col-md-6 mbsc-col-12">
                        <div>
                            <label for="email">Email</label>
                            <input id="email" type="text" placeholder="Email" class="custom-input" />
                        </div>
                    </div>
                    <div class="mbsc-col-md-6 mbsc-col-12">
                        <div>
                            <label for="pass">Password</label>
                            <input id="pass" type="password" placeholder="Password" class="custom-input" />
                        </div>
                    </div>
                </div>
                <div class="mbsc-row">
                    <div class="mbsc-col-md-6 mbsc-col-12">
                        <div>
                            <label for="city">City</label>
                            <input id="city" type="text" placeholder="City" class="custom-input" />
                        </div>
                    </div>
                    <div class="mbsc-col-md-3 mbsc-col-6">
                        <div>
                            <label for="state">State</label>
                            <input id="state" type="text" placeholder="State" class="custom-input" />
                        </div>
                    </div>
                    <div class="mbsc-col-md-3 mbsc-col-6">
                        <div>
                            <label for="zip">Zip</label>
                            <input id="zip" type="text" placeholder="Zip" class="custom-input" />
                        </div>
                    </div>
                </div>
                <div class="mbsc-row">
                    <div class="mbsc-col-md-6 mbsc-col-12">
                        <mbsc-switch [(ngModel)]="agree1" name="agree">Agree to terms and conditions</mbsc-switch>
                    </div>
                </div>
                <div class="mbsc-row">
                    <div class="mbsc-col-6">
                        <button>Submit</button>
                    </div>
                </div>
            </form>
        </div>
        <div class="mbsc-col-md-10 mbsc-col-xl-9">
            <h4>Skip enhancement of elements inside a mobiscroll form</h4>
            <mbsc-form class="mbsc-form-grid mbsc-grid">
                <div class="mbsc-row">
                    <div class="mbsc-col-md-6 mbsc-col-12">
                        <mbsc-input input-style="box" label-style="floating" type="text" placeholder="Email">Email</mbsc-input>
                    </div>
                    <div class="mbsc-col-md-6 mbsc-col-12">
                        <mbsc-input input-style="box" label-style="floating" type="password" placeholder="Password" [password-toggle]="true">Password</mbsc-input>
                    </div>
                </div>
                <div class="mbsc-row">
                    <div class="mbsc-col-md-6 mbsc-col-12">
                        <mbsc-input input-style="box" label-style="floating" type="text" placeholder="City">City</mbsc-input>
                    </div>
                    <div class="mbsc-col-md-3 mbsc-col-6">
                        <mbsc-input input-style="box" label-style="floating" type="text" placeholder="State">State</mbsc-input>
                    </div>
                    <div class="mbsc-col-md-3 mbsc-col-6">
                        <mbsc-input input-style="box" label-style="floating" type="text" placeholder="Zip">Zip</mbsc-input>
                    </div>
                </div>
                <div class="mbsc-row">
                    <div class="mbsc-col-md-6 mbsc-col-12">
                        <mbsc-switch [(ngModel)]="agree2" input-style="box">Agree to terms and conditions</mbsc-switch>
                    </div>
                </div>
                <div class="mbsc-row">
                    <div class="mbsc-col-6">
                        <button class="custom-button">Submit</button>
                    </div>
                </div>
            </mbsc-form>
        </div>
        <div class="mbsc-col-md-10 mbsc-col-xl-9 mbsc-form-grid outside-form">
            <h4>Using form elements outside of forms</h4>
            <div class="mbsc-row mbsc-padding">
                <p>
                    Lorem ipsum dolor sit amet, similique expetendis suscipiantur no eos. Veniam officiis singulis usu id. Iriure animal vim ad, vix ex porro melius labitur, ea mentitum splendide laboramus pro. His vitae fabellas in, ad sed justo maiestatis. Te per quot
                    brute civibus. Ei elit voluptatum usu. Fuisset necessitatibus eum cu, te deserunt omittantur nam.
                </p>
            </div>
            <div class="mbsc-row mbsc-align-items-center mbsc-justify-content-center mbsc-padding">
                <div class="mbsc-col-12 mbsc-align-center">
                    <h4>Subscribe to our newsletter</h4>
                </div>
                <div class="mbsc-col-md-6 mbsc-col-12">
                    <mbsc-input input-style="box" type="text" placeholder="Enter your email address"></mbsc-input>
                </div>
                <div class="mbsc-col-md-3 mbsc-col-12 mbsc-align-center">
                    <mbsc-button class="mbsc-btn-primary">Subscribe</mbsc-button>
                </div>
            </div>
            <div class="mbsc-row mbsc-padding">
                <p>
                    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
                    in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
                </p>
            </div>
        </div>
    </div>
</div>
.md-custom-usage {
    font-size: 16px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.custom-form {
    margin: 0 -16px;
}

.custom-section {
    margin: 20px 0;
}

.custom-form .mbsc-row {
    margin: 10px 0;
}

.custom-input {
    height: 40px;
    width: 100%;
    padding: 0 16px;
}

.md-custom-usage .custom-form button {
    font-size: 14px;
    font-weight: 600;
    background: #6be085;
    color: #000;
    padding: 15px 25px;
}

.md-custom-usage button.custom-button {
    font-size: 14px;
    font-weight: 600;
    background: #6be085;
    color: #000;
    padding: 15px 25px;
    margin: 10px 16px;
}

.outside-form p {
    text-align: justify;
}
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

There are two approaches to implement and validate forms in Angular. You can use Mobiscroll forms with both approaches. Mobiscroll takes care of styling and showing the correct message when wired up correctly.

Template driven forms

With template driven validation, we can set up the whole validation in the template of our component using directives as seen in the first part of our example. The #templateForm="ngForm" template variable will hold the FormGroup. We can later check if the form is valid through this variable.

Use required and minlength directives to make the fields required and give the password the minimum 6 charachters long rule. Use the mobiscroll components [error] and [errorMessage] attributes.

To give each error and field a proper error message, set up a message object in the component, and wire them to the proper [errorMessage] attribute.

Follow a more detailed guide from the documentation.

Reactive forms

In the case of reactive forms, the rules are defined in typescript by importing the Validators. Create a form with the FormBuilder and set up the rules.

The error messages can be set up similarily to the template driven approach and referenced in the [errorMessage] attribute.

Follow a more detailed guide from the documentation.

Are you building with Ionic framework?  Learn how to validate mobiscroll forms in ionic →
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 - Various fields

Change demo
Various fields
Craft great looking forms in Angular with fields, buttons, switches, radios, toggles, sliders, steppers and more. For Angular 2/4/5/6/7/8 and Ionic 2/3/4.
import { Component } from '@angular/core';
import { mobiscroll } from '@mobiscroll/angular';

mobiscroll.settings = {
    lang: '',
    theme: ''
};

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})
export class AppComponent {
    seg = 'minus';
    slider = 80;
    prog1 = 60;
    prog2 = 50;
    checkbox1 = true;
    checkbox2 = true;
    switch1 = true;
    switch2 = true;
    radio1 = 1;
    radio2 = 1;

    showAlert() {
        mobiscroll.alert({
            title: 'Alert',
            message: 'Alert message',
            callback: function () {
                mobiscroll.toast({
                    message: 'Alert closed'
                });
            }
        });
    }
    
    showConfirm() {
        mobiscroll.confirm({
            title: 'Confirm',
            message: 'Confirm message.',
            callback: function (res) {
                mobiscroll.toast({
                    message: res ? 'OK' : 'Canceled'
                });
            }
        });
    }

    showPrompt() {
        mobiscroll.prompt({
            title: 'Prompt',
            message: 'Prompt message.',
            placeholder: 'Type here',
            callback: function (value) {
                mobiscroll.toast({
                    message: value === null ? 'Canceled' : ('Your text: ' + value)
                });
            }
        });
    }

    showToast() {
        mobiscroll.toast({
            message: 'This is a toast'
        });
    }

    showSnackbar() {
        mobiscroll.snackbar({
            message: 'This is a snackbar'
        });
    }
}
<mbsc-form class="mbsc-no-padding" input-style="box">
    <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>
                    <mbsc-form-group-title>Alerts & Notifications</mbsc-form-group-title>
                    <div class="mbsc-btn-group">
                        <mbsc-button (click)="showAlert()">Alert</mbsc-button>
                        <mbsc-button (click)="showConfirm()">Confirm</mbsc-button>
                        <mbsc-button (click)="showPrompt()">Prompt</mbsc-button>
                        <mbsc-button (click)="showToast()">Toast</mbsc-button>
                        <mbsc-button (click)="showSnackbar()">Snackbar</mbsc-button>
                    </div>
                    <div class="mbsc-align-center">
                        <mbsc-note color="primary">This is a primary note!</mbsc-note>
                    </div>
                </mbsc-form-group>
                <mbsc-form-group>
                    <mbsc-form-group-title>Buttons</mbsc-form-group-title>
                    <div class="mbsc-btn-group">
                        <mbsc-button>Button</mbsc-button>
                        <mbsc-button [disabled]="true">Disabled</mbsc-button>
                        <mbsc-button class="mbsc-btn-flat">Flat</mbsc-button>
                        <mbsc-button class="mbsc-btn-outline">Outline</mbsc-button>
                        <mbsc-button class="mbsc-btn-success">Success</mbsc-button>
                        <mbsc-button class="mbsc-btn-warning">Warning</mbsc-button>
                    </div>
                    <mbsc-segmented-group [(ngModel)]="seg">
                        <mbsc-segmented input-style="box" icon="minus" value="minus"></mbsc-segmented>
                        <mbsc-segmented input-style="box" icon="plus" value="plus"></mbsc-segmented>
                    </mbsc-segmented-group>
                    <mbsc-stepper input-style="box">Stepper</mbsc-stepper>
                </mbsc-form-group>
                <mbsc-form-group>
                    <mbsc-form-group-title>Inputs & Fields</mbsc-form-group-title>
                    <mbsc-input icon="user4" input-style="box" label-style="floating" placeholder="Input with label">Input field</mbsc-input>
                    <mbsc-input type="password" input-style="box" label-style="floating" password-toggle="true" placeholder="Password field">Password</mbsc-input>
                    <mbsc-input type="file" input-style="box" label-style="floating" placeholder="Select file...">File upload</mbsc-input>
                    <mbsc-textarea input-style="box" label-style="floating" icon="bubble" icon-align="left" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                    <mbsc-dropdown input-style="box" label="Select">
                        <option value="Opel">Opel</option>
                        <option value="Renault">Renault</option>
                        <option value="Citroen">Citroen</option>
                        <option value="Lotus">Lotus</option>
                    </mbsc-dropdown>
                </mbsc-form-group>
                <mbsc-form-group>
                    <mbsc-form-group-title>Slider & Progress</mbsc-form-group-title>
                    <mbsc-slider input-style="box">Slider</mbsc-slider>
                    <mbsc-slider input-style="box" color="danger" [(ngModel)]="slider">Danger</mbsc-slider>
                    <mbsc-progress input-style="box" [(ngModel)]="prog1">Progress</mbsc-progress>
                    <mbsc-progress input-style="box" color="success" [(ngModel)]="prog2">Success</mbsc-progress>
                    <mbsc-rating input-style="box">Rating</mbsc-rating>
                    <mbsc-rating input-style="box" color="info" step=".5" value="3.5">Info</mbsc-rating>
                </mbsc-form-group>
                <mbsc-form-group>
                    <mbsc-form-group-title>Toggle & Radio</mbsc-form-group-title>
                    <mbsc-checkbox input-style="box" [(ngModel)]="checkbox1">Checkbox</mbsc-checkbox>
                    <mbsc-checkbox input-style="box" color="danger" [(ngModel)]="checkbox2">Danger</mbsc-checkbox>
                    <mbsc-switch input-style="box" [(ngModel)]="switch1">Switch</mbsc-switch>
                    <mbsc-switch input-style="box" color="info" [(ngModel)]="switch2">Info</mbsc-switch>
                    <mbsc-radio-group [(ngModel)]="radio1">
                        <mbsc-radio input-style="box" value="1"> Radio Label 1</mbsc-radio>
                        <mbsc-radio input-style="box" value="2"> Radio Label 2</mbsc-radio>
                    </mbsc-radio-group>
                    <mbsc-radio-group [(ngModel)]="radio2" color="warning">
                        <mbsc-radio input-style="box" value="1"> Warning Label 1</mbsc-radio>
                        <mbsc-radio input-style="box" value="2"> Warning Label 2</mbsc-radio>
                    </mbsc-radio-group>
                </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 - Inline components

Change demo
Inline components
Embed inline pickers like calendars, select & more inside Angular forms. Keep the look & feel consistent across the whole page. For Angular 2/4/5/6/7/8 and Ionic 2/3/4.
import { Component } from '@angular/core';
import { mobiscroll, MbscSelectOptions, MbscRangeOptions } from '@mobiscroll/angular';

mobiscroll.settings = {
    lang: '',
    theme: ''
};

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

export class AppComponent {
    adults = 1;
    children = 0;
    infants = 0;
    star = "1";
    price = 100;
    myrange = [new Date(2019, 10, 10), new Date(2019, 10, 12)];
    work = false;

    stars = [{
        value: "1",
        text: "1 star"
    }, {
        value: "2",
        text: "2 stars"
    }, {
        value: "3",
        text: "3 stars"
    }, {
        value: "4",
        text: "4 stars"
    }, {
        value: "4",
        text: "5 stars"
    }];

    selectSettings: MbscSelectOptions = {
        display: 'inline',
        select: 'multiple'
    };

    rangeSettings: MbscRangeOptions = {
        display: 'inline',
        showSelector: false
    }
}
<mbsc-form label-style="floating" enhance="true">
    <div>
        <mbsc-input label-style="floating" placeholder="Where are you traveling?">Destination/Property name</mbsc-input>
        <mbsc-stepper [(ngModel)]="adults" min="1" max="15">Adults
            <span class="mbsc-desc">From 14 years</span>
        </mbsc-stepper>
        <mbsc-stepper [(ngModel)]="children" max="15" val="left">Children
            <span class="mbsc-desc">2-14 years</span>
        </mbsc-stepper>
        <mbsc-stepper [(ngModel)]="infant" max="15" val="left" max="10">Infant
            <span class="mbsc-desc">0-2 years</span>
        </mbsc-stepper>
        <label>
            Star rating
            <select mbsc-select [(ngModel)]="star" [mbsc-options]="selectSettings">
                <option value="1">1 star</option>
                <option value="2">2 stars</option>
                <option value="3">3 stars</option>
                <option value="4">4 stars</option>
                <option value="4">5 stars</option>
            </select>
        </label>
        <mbsc-slider max="1000" val="left" tooltip="true" value-template="${value}" label-style="stacked" [(ngModel)]="price">
            Price up to
        </mbsc-slider>
        <label>
            Checkin & checkout dates
            <input mbsc-range [(ngModel)]="myrange" [mbsc-options]="rangeSettings"/>
        </label>
        <mbsc-switch [(ngModel)]="work">Traveling for work?</mbsc-switch>
    </div>
    <mbsc-form-group inset>
        <mbsc-button class="mbsc-btn-block" color="primary">Search</mbsc-button>
    </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 - Embedded forms

Change demo
Embedded forms

You can place forms not just on simple pages, but they can be embedded into different containers depending on the layout.

Use them within cards or place them on pop-overs.

import { Component } from '@angular/core';
import { mobiscroll, MbscPopupOptions } from '@mobiscroll/angular';

mobiscroll.settings = {
    lang: '',
    theme: ''
}

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})
export class AppComponent {
    popupSettings: MbscPopupOptions = {
        display: 'center',
        cssClass: 'mbsc-no-padding',
        buttons: [{
                text: 'Submit',
                handler: 'set'
            },
            'cancel'
        ]
    };
}
<mbsc-note color="secondary" class="mbsc-align-center">Embed forms in cards or any layout element. 👇</mbsc-note>
<mbsc-card>
    <mbsc-card-header>
        <mbsc-card-title>Confirm Purchase</mbsc-card-title>
    </mbsc-card-header>
    <mbsc-card-content>
        <mbsc-input [(ngModel)]="name" placeholder="Required">Name</mbsc-input>
        <mbsc-input [(ngModel)]="card" placeholder="Credit card number">Card</mbsc-input>
        <mbsc-input [(ngModel)]="exp" placeholder="Required">Expiration</mbsc-input>
        <mbsc-input [(ngModel)]="cvv" placeholder="3-digit CVV">Security</mbsc-input>
    </mbsc-card-content>
    <div class="mbsc-btn-group-block mbsc-padding">
        <mbsc-button color="primary">Confirm</mbsc-button>
    </div>
</mbsc-card>
<mbsc-note color="secondary" class="mbsc-align-center">You can also use embedded forms in pop-overs. 👇</mbsc-note>
<div class="mbsc-btn-group-block">
    <mbsc-button (click)="mbscPopup.instance.show()">Show popover with form</mbsc-button>
</div>
<mbsc-popup [options]="popupSettings" #mbscPopup="mobiscroll">
    <mbsc-form>
        <mbsc-form-group inset>
            <mbsc-form-group-title>Personal information</mbsc-form-group-title>
            <mbsc-input data-label-style="inline" type="text" placeholder="John Doe">Name</mbsc-input>
            <mbsc-input data-label-style="inline" type="text" placeholder="john@email.com">Email</mbsc-input>
            <mbsc-input data-label-style="inline" type="text" placeholder="28 Darwin Street">Address</mbsc-input>
            <mbsc-input data-label-style="inline" type="text" placeholder="Liverpool">City</mbsc-input>
        </mbsc-form-group>
    </mbsc-form>
</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 - Input styling

Change demo
Input styling
See how inline, floating and stacked labels look in Angular form fields with underline, box and outline rendering. For Angular 2/4/5/6/7/8 and Ionic 2/3/4.
import { Component } from '@angular/core';
import { mobiscroll } from '@mobiscroll/angular';

mobiscroll.settings = {
    lang: '',
    theme: ''
};


@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})
export class AppComponent {
    switch1 = true;
    switch2 = true;
    switch3 = true;

    checkbox1 = true;
    checkbox2 = true;
    checkbox3 = true;
}
<div class="mbsc-grid mbsc-form-grid">
    <div class="mbsc-row">
        <div class="mbsc-col-sm-12 mbsc-col-md-4">
            <mbsc-form>
                <h3 class="md-form-styling-hdr">Underline input style</h3>
                <mbsc-form-group>
                    <mbsc-input type="text" icon="user4" input-style="underline" placeholder="Input with label">Input field</mbsc-input>
                    <mbsc-textarea input-style="underline" icon="bubble" icon-align="left" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                    <mbsc-dropdown input-style="underline" label="Select">
                        <option value="Opel">Opel</option>
                        <option value="Renault">Renault</option>
                        <option value="Citroen">Citroen</option>
                        <option value="Lotus">Lotus</option>
                    </mbsc-dropdown>
                    <mbsc-switch [(ngModel)]="switch1" input-style="underline">Switch</mbsc-switch>
                    <mbsc-checkbox [(ngModel)]="checkbox1" input-style="underline">Checkbox</mbsc-checkbox>
                    <mbsc-slider [value]="50" input-style="underline">Slider</mbsc-slider>
                    <mbsc-progress [value]="50" input-style="underline">Progress</mbsc-progress>
                    <mbsc-rating [(ngModel)]="rating1" input-style="underline">Rating</mbsc-rating>
                </mbsc-form-group>
                <mbsc-form-group>
                    <mbsc-form-group-title>Inline label</mbsc-form-group-title>
                    <mbsc-input type="text" input-style="underline" label-style="inline" placeholder="Input with label">Input field</mbsc-input>
                    <mbsc-textarea input-style="underline" label-style="inline" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                </mbsc-form-group>
                <mbsc-form-group>
                    <mbsc-form-group-title>Stacked label</mbsc-form-group-title>
                    <mbsc-input type="text" input-style="underline" label-style="stacked" placeholder="Input with label">Input field</mbsc-input>
                    <mbsc-textarea input-style="underline" label-style="stacked" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                </mbsc-form-group>
                <mbsc-form-group>
                    <mbsc-form-group-title>Floating label</mbsc-form-group-title>
                    <mbsc-input type="text" input-style="underline" label-style="floating" placeholder="Input with label">Input field</mbsc-input>
                    <mbsc-textarea input-style="underline" label-style="floating" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                </mbsc-form-group>
            </mbsc-form>
        </div>
        <div class="mbsc-col-sm-12 mbsc-col-md-4">
            <mbsc-form input-style="box">
                <h3 className="md-form-styling-hdr md-form-styling-hdr-adjust">Box input style</h3>
                <mbsc-form-group>
                    <mbsc-input type="text" icon="user4" input-style="box" label-style="floating" placeholder="Input with label">Input field</mbsc-input>
                    <mbsc-textarea input-style="box" label-style="floating" icon="bubble" icon-align="left" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                    <mbsc-dropdown input-style="box" label-style="floating" label="Select">
                        <option value="Opel">Opel</option>
                        <option value="Renault">Renault</option>
                        <option value="Citroen">Citroen</option>
                        <option value="Lotus">Lotus</option>
                    </mbsc-dropdown>
                    <mbsc-switch [(ngModel)]="switch2" input-style="box">Switch</mbsc-switch>
                    <mbsc-checkbox [(ngModel)]="checkbox2" input-style="box">Checkbox</mbsc-checkbox>
                    <mbsc-slider [value]="50" input-style="box">Slider</mbsc-slider>
                    <mbsc-progress [value]="50" input-style="box">Progress</mbsc-progress>
                    <mbsc-rating [(ngModel)]="rating2" input-style="box">Rating</mbsc-rating>
                </mbsc-form-group>
                <mbsc-form-group>
                    <mbsc-form-group-title>Inline label</mbsc-form-group-title>
                    <mbsc-input type="text" input-style="box" label-style="inline" placeholder="Input with label">Input field</mbsc-input>
                    <mbsc-textarea input-style="box" label-style="inline" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                </mbsc-form-group>
                <mbsc-form-group>
                    <mbsc-form-group-title>Stacked label</mbsc-form-group-title>
                    <mbsc-input type="text" input-style="box" label-style="stacked" placeholder="Input with label">Input field</mbsc-input>
                    <mbsc-textarea input-style="box" label-style="stacked" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                </mbsc-form-group>
                <mbsc-form-group>
                    <mbsc-form-group-title>Floating label</mbsc-form-group-title>
                    <mbsc-input type="text" input-style="box" label-style="floating" placeholder="Input with label">Input field</mbsc-input>
                    <mbsc-textarea input-style="box" label-style="floating" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                </mbsc-form-group>
            </mbsc-form>
        </div>
        <div class="mbsc-col-sm-12 mbsc-col-md-4">
            <mbsc-form input-style="outline">
                <h3 className="md-form-styling-hdr md-form-styling-hdr-adjust">Outline input style</h3>
                <mbsc-form-group>
                    <mbsc-input type="text" icon="user4" input-style="outline" label-style="floating" placeholder="Input with label">Input field</mbsc-input>
                    <mbsc-textarea input-style="outline" label-style="floating" icon="bubble" icon-align="left" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                    <mbsc-dropdown input-style="outline" label-style="floating" label="Select">
                        <option value="Opel">Opel</option>
                        <option value="Renault">Renault</option>
                        <option value="Citroen">Citroen</option>
                        <option value="Lotus">Lotus</option>
                    </mbsc-dropdown>
                    <mbsc-switch [(ngModel)]="switch3" input-style="outline">Switch</mbsc-switch>
                    <mbsc-checkbox [(ngModel)]="checkbox3" input-style="outline">Checkbox</mbsc-checkbox>
                    <mbsc-slider [value]="50" input-style="outline">Slider</mbsc-slider>
                    <mbsc-progress [value]="50" input-style="outline">Progress</mbsc-progress>
                    <mbsc-rating [(ngModel)]="rating3" input-style="outline">Rating</mbsc-rating>
                </mbsc-form-group>
                <mbsc-form-group>
                    <mbsc-form-group-title>Inline label</mbsc-form-group-title>
                    <mbsc-input type="text" input-style="outline" label-style="inline" placeholder="Input with label">Input field</mbsc-input>
                    <mbsc-textarea input-style="outline" label-style="inline" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                </mbsc-form-group>
                <mbsc-form-group>
                    <mbsc-form-group-title>Stacked label</mbsc-form-group-title>
                    <mbsc-input type="text" input-style="outline" label-style="stacked" placeholder="Input with label">Input field</mbsc-input>
                    <mbsc-textarea input-style="outline" label-style="stacked" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                </mbsc-form-group>
                <mbsc-form-group>
                    <mbsc-form-group-title>Floating label</mbsc-form-group-title>
                    <mbsc-input type="text" input-style="outline" label-style="floating" placeholder="Input with label">Input field</mbsc-input>
                    <mbsc-textarea input-style="outline" label-style="floating" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                </mbsc-form-group>
            </mbsc-form>
        </div>
    </div>
</div>
.mbsc-page h3.md-form-styling-hdr {
    margin: 16px;
}

.mbsc-page.mbsc-ios h3.md-form-styling-hdr-adjust {
    margin-bottom: -1px;
}
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/8 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/8 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 class="mbsc-desc">
                <span class="mbsc-ic mbsc-ic-checkmark"></span> Use lowercase and uppercase characters
            </h6>
            <h6 class="mbsc-desc">
                <span class="mbsc-ic mbsc-ic-checkmark"></span> 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/8 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 { }

Forms - Theming capabilities

Change demo
Theming capabilities

Forms can be themed and customized. There are four levels of customization:

  • Base themes: Choose between Mobiscroll, iOS, Android Material and Windows.
  • Light or dark: Every theme has a light and dark variant.
  • Custom themes: Use the theme builder to customize the colors and make it match your brand.
  • Custom Sass and CSS: If you need further customization, the sky is the limit with Sass and CSS overrides.

You can also see how the other demos look by changing the theme in the floating action bar on the right side (not this example, the themes are hardcoded here).

import { Component } from '@angular/core';

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

export class AppComponent {
    iosLightSwitch = true;
    iosDarkSwitch = true;
    iosCustomSwitch = true;
    matLightSwitch = true;
    matDarkSwitch = true;
    matCustomSwitch = true;
    winLightSwitch = true;
    winDarkSwitch = true;
    winCustomSwitch = true;
    mobiLightSwitch = true;
    mobiDarkSwitch = true;
    mobiCustomSwitch = true;
    iosLightCheck = true;
    iosDarkCheck = true;
    iosCustomCheck = true;
    matLightCheck = true;
    matDarkCheck = true;
    matCustomCheck = true;
    winLightCheck = true;
    winDarkCheck = true;
    winCustomCheck = true;
    mobiLightCheck = true;
    mobiDarkCheck = true;
    mobiCustomCheck = true
}
<div class="mbsc-grid mbsc-no-padding">
    <div class="mbsc-row">
        <mbsc-form theme="ios" class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-form-box mbsc-form-grid">
            <mbsc-form-group>
                <mbsc-form-group-title><b>iOS light theme</b></mbsc-form-group-title>
                <mbsc-input type="text" icon="user4" data-input-style="box" label-style="floating" placeholder="Input with label">Input</mbsc-input>
                <mbsc-textarea input-style="box" label-style="floating" icon="bubble" icon-align="left" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                <mbsc-dropdown input-style="box" label-style="floating" label="Select">
                    <option value="Opel">Opel</option>
                    <option value="Renault">Renault</option>
                    <option value="Citroen">Citroen</option>
                    <option value="Lotus">Lotus</option>
                </mbsc-dropdown>
                <mbsc-switch [(ngModel)]="iosLightSwitch" input-style="box">Switch</mbsc-switch>
                <mbsc-checkbox [(ngModel)]="iosLightCheck" input-style="outline">Checkbox</mbsc-checkbox>
                <mbsc-slider input-style="box" type="range">Slider</mbsc-slider>
                <mbsc-progress input-style="box" value="50">Progress</mbsc-progress>
                <mbsc-rating input-style="box" type="rating">Rating</mbsc-rating>
            </mbsc-form-group>
        </mbsc-form>
        <mbsc-form theme="ios-dark" input-style="box" class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-form-box mbsc-form-grid">
            <mbsc-form-group>
                <mbsc-form-group-title><b>iOS dark theme</b></mbsc-form-group-title>
                <mbsc-input type="text" icon="user4" data-input-style="box" label-style="floating" placeholder="Input with label">Input</mbsc-input>
                <mbsc-textarea input-style="box" label-style="floating" icon="bubble" icon-align="left" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                <mbsc-dropdown input-style="box" label-style="floating" label="Select">
                    <option value="Opel">Opel</option>
                    <option value="Renault">Renault</option>
                    <option value="Citroen">Citroen</option>
                    <option value="Lotus">Lotus</option>
                </mbsc-dropdown>
                <mbsc-switch [(ngModel)]="iosDarkSwitch" input-style="box">Switch</mbsc-switch>
                <mbsc-checkbox [(ngModel)]="iosDarkCheck" input-style="box">Checkbox</mbsc-checkbox>
                <mbsc-slider input-style="box" type="range">Slider</mbsc-slider>
                <mbsc-progress input-style="box" value="50">Progress</mbsc-progress>
                <mbsc-rating input-style="box" type="rating">Rating</mbsc-rating>
            </mbsc-form-group>
        </mbsc-form>
        <mbsc-form theme="ios-gray" input-style="box" class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-form-box mbsc-form-grid">
            <mbsc-form-group>
                <mbsc-form-group-title><b>iOS custom theme</b></mbsc-form-group-title>
                <mbsc-input type="text" icon="user4" data-input-style="box" label-style="floating" placeholder="Input with label">Input</mbsc-input>
                <mbsc-textarea input-style="box" label-style="floating" icon="bubble" icon-align="left" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                <mbsc-dropdown input-style="box" label-style="floating" label="Select">
                    <option value="Opel">Opel</option>
                    <option value="Renault">Renault</option>
                    <option value="Citroen">Citroen</option>
                    <option value="Lotus">Lotus</option>
                </mbsc-dropdown>
                <mbsc-switch [(ngModel)]="iosCustomSwitch" input-style="box">Switch</mbsc-switch>
                <mbsc-checkbox [(ngModel)]="iosCustomCheck" input-style="box">Checkbox</mbsc-checkbox>
                <mbsc-slider input-style="box" type="range">Slider</mbsc-slider>
                <mbsc-progress input-style="box" value="50">Progress</mbsc-progress>
                <mbsc-rating input-style="box" type="rating">Rating</mbsc-rating>
            </mbsc-form-group>
        </mbsc-form>
    </div>
    <div class="mbsc-row">
        <mbsc-form theme="material" class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-form-box mbsc-form-grid">
            <mbsc-form-group>
                <mbsc-form-group-title><b>Material light theme</b></mbsc-form-group-title>
                <mbsc-input type="text" icon="user4" data-input-style="box" label-style="floating" placeholder="Input with label">Input</mbsc-input>
                <mbsc-textarea input-style="box" label-style="floating" icon="bubble" icon-align="left" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                <mbsc-dropdown input-style="box" label-style="floating" label="Select">
                    <option value="Opel">Opel</option>
                    <option value="Renault">Renault</option>
                    <option value="Citroen">Citroen</option>
                    <option value="Lotus">Lotus</option>
                </mbsc-dropdown>
                <mbsc-switch [(ngModel)]="matLightSwitch" input-style="box">Switch</mbsc-switch>
                <mbsc-checkbox [(ngModel)]="matLightCheck" input-style="box">Checkbox</mbsc-checkbox>
                <mbsc-slider input-style="box" type="range">Slider</mbsc-slider>
                <mbsc-progress input-style="box" value="50">Progress</mbsc-progress>
                <mbsc-rating input-style="box" type="rating">Rating</mbsc-rating>
            </mbsc-form-group>
        </mbsc-form>
        <mbsc-form theme="material-dark" class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-form-box mbsc-form-grid">
            <mbsc-form-group>
                <mbsc-form-group-title><b>Material dark theme</b></mbsc-form-group-title>
                <mbsc-input type="text" icon="user4" data-input-style="box" label-style="floating" placeholder="Input with label">Input</mbsc-input>
                <mbsc-textarea input-style="box" label-style="floating" icon="bubble" icon-align="left" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                <mbsc-dropdown input-style="box" label-style="floating" label="Select">
                    <option value="Opel">Opel</option>
                    <option value="Renault">Renault</option>
                    <option value="Citroen">Citroen</option>
                    <option value="Lotus">Lotus</option>
                </mbsc-dropdown>
                <mbsc-switch [(ngModel)]="matDarkSwitch" input-style="box">Switch</mbsc-switch>
                <mbsc-checkbox [(ngModel)]="matDarkCheck" input-style="box">Checkbox</mbsc-checkbox>
                <mbsc-slider input-style="box" type="range">Slider</mbsc-slider>
                <mbsc-progress input-style="box" value="50">Progress</mbsc-progress>
                <mbsc-rating input-style="box" type="rating">Rating</mbsc-rating>
            </mbsc-form-group>
        </mbsc-form>
        <mbsc-form theme="material-indigo" class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-form-box mbsc-form-grid">
            <mbsc-form-group>
                <mbsc-form-group-title><b>Material custom theme</b></mbsc-form-group-title>
                <mbsc-input type="text" icon="user4" data-input-style="box" label-style="floating" placeholder="Input with label">Input</mbsc-input>
                <mbsc-textarea input-style="box" label-style="floating" icon="bubble" icon-align="left" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                <mbsc-dropdown input-style="box" label-style="floating" label="Select">
                    <option value="Opel">Opel</option>
                    <option value="Renault">Renault</option>
                    <option value="Citroen">Citroen</option>
                    <option value="Lotus">Lotus</option>
                </mbsc-dropdown>
                <mbsc-switch [(ngModel)]="matCustomSwitch" input-style="box">Switch</mbsc-switch>
                <mbsc-checkbox [(ngModel)]="matCustomCheck" input-style="box">Checkbox</mbsc-checkbox>
                <mbsc-slider input-style="box" type="range">Slider</mbsc-slider>
                <mbsc-progress input-style="box" value="50">Progress</mbsc-progress>
                <mbsc-rating input-style="box" type="rating">Rating</mbsc-rating>
            </mbsc-form-group>
        </mbsc-form>
    </div>
    <div class="mbsc-row">
        <mbsc-form theme="windows" class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-form-box mbsc-form-grid">
            <mbsc-form-group>
                <mbsc-form-group-title>Windows light theme</mbsc-form-group-title>
                <mbsc-input type="text" icon="user4" data-input-style="box" label-style="floating" placeholder="Input with label">Input</mbsc-input>
                <mbsc-textarea input-style="box" label-style="floating" icon="bubble" icon-align="left" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                <mbsc-dropdown input-style="box" label-style="floating" label="Select">
                    <option value="Opel">Opel</option>
                    <option value="Renault">Renault</option>
                    <option value="Citroen">Citroen</option>
                    <option value="Lotus">Lotus</option>
                </mbsc-dropdown>
                <mbsc-switch [(ngModel)]="winLightSwitch" input-style="box">Switch</mbsc-switch>
                <mbsc-checkbox [(ngModel)]="winLightCheck" input-style="box">Checkbox</mbsc-checkbox>
                <mbsc-slider input-style="box" type="range">Slider</mbsc-slider>
                <mbsc-progress input-style="box" value="50">Progress</mbsc-progress>
                <mbsc-rating input-style="box" type="rating">Rating</mbsc-rating>
            </mbsc-form-group>
        </mbsc-form>
        <mbsc-form theme="windows-dark" class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-form-box mbsc-form-grid">
            <mbsc-form-group>
                <mbsc-form-group-title>Windows dark theme</mbsc-form-group-title>
                <mbsc-input type="text" icon="user4" data-input-style="box" label-style="floating" placeholder="Input with label">Input</mbsc-input>
                <mbsc-textarea input-style="box" label-style="floating" icon="bubble" icon-align="left" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                <mbsc-dropdown input-style="box" label-style="floating" label="Select">
                    <option value="Opel">Opel</option>
                    <option value="Renault">Renault</option>
                    <option value="Citroen">Citroen</option>
                    <option value="Lotus">Lotus</option>
                </mbsc-dropdown>
                <mbsc-switch [(ngModel)]="winDarkSwitch" input-style="box">Switch</mbsc-switch>
                <mbsc-checkbox [(ngModel)]="winDarkCheck" input-style="box">Checkbox</mbsc-checkbox>
                <mbsc-slider input-style="box" type="range">Slider</mbsc-slider>
                <mbsc-progress input-style="box" value="50">Progress</mbsc-progress>
                <mbsc-rating input-style="box" type="rating">Rating</mbsc-rating>
            </mbsc-form-group>
        </mbsc-form>
        <mbsc-form theme="windows-yellow" class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-form-box mbsc-form-grid">
            <mbsc-form-group>
                <mbsc-form-group-title>Windows custom theme</mbsc-form-group-title>
                <mbsc-input type="text" icon="user4" data-input-style="box" label-style="floating" placeholder="Input with label">Input</mbsc-input>
                <mbsc-textarea input-style="box" label-style="floating" icon="bubble" icon-align="left" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                <mbsc-dropdown input-style="box" label-style="floating" label="Select">
                    <option value="Opel">Opel</option>
                    <option value="Renault">Renault</option>
                    <option value="Citroen">Citroen</option>
                    <option value="Lotus">Lotus</option>
                </mbsc-dropdown>
                <mbsc-switch [(ngModel)]="winCustomSwitch" input-style="box">Switch</mbsc-switch>
                <mbsc-checkbox [(ngModel)]="winCustomCheck" input-style="box">Checkbox</mbsc-checkbox>
                <mbsc-slider input-style="box" type="range">Slider</mbsc-slider>
                <mbsc-progress input-style="box" value="50">Progress</mbsc-progress>
                <mbsc-rating input-style="box" type="rating">Rating</mbsc-rating>
            </mbsc-form-group>
        </mbsc-form>
    </div>
    <div class="mbsc-row">
        <mbsc-form theme="mobiscroll" class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-form-box mbsc-form-grid">
            <mbsc-form-group>
                <mbsc-form-group-title><b>Mobiscroll light theme</b></mbsc-form-group-title>
                <mbsc-input type="text" icon="user4" data-input-style="box" label-style="floating" placeholder="Input with label">Input</mbsc-input>
                <mbsc-textarea input-style="box" label-style="floating" icon="bubble" icon-align="left" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                <mbsc-dropdown input-style="box" label-style="floating" label="Select">
                    <option value="Opel">Opel</option>
                    <option value="Renault">Renault</option>
                    <option value="Citroen">Citroen</option>
                    <option value="Lotus">Lotus</option>
                </mbsc-dropdown>
                <mbsc-switch [(ngModel)]="mobiLightSwitch" input-style="box">Switch</mbsc-switch>
                <mbsc-checkbox [(ngModel)]="mobiLightCheck" input-style="box">Checkbox</mbsc-checkbox>
                <mbsc-slider input-style="box" type="range">Slider</mbsc-slider>
                <mbsc-progress input-style="box" value="50">Progress</mbsc-progress>
                <mbsc-rating input-style="box" type="rating">Rating</mbsc-rating>
            </mbsc-form-group>
        </mbsc-form>
        <mbsc-form theme="mobiscroll-dark" class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-form-box mbsc-form-grid">
            <mbsc-form-group>
                <mbsc-form-group-title><b>Mobiscroll dark theme</b></mbsc-form-group-title>
                <mbsc-input type="text" icon="user4" data-input-style="box" label-style="floating" placeholder="Input with label">Input</mbsc-input>
                <mbsc-textarea input-style="box" label-style="floating" icon="bubble" icon-align="left" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                <mbsc-dropdown input-style="box" label-style="floating" label="Select">
                    <option value="Opel">Opel</option>
                    <option value="Renault">Renault</option>
                    <option value="Citroen">Citroen</option>
                    <option value="Lotus">Lotus</option>
                </mbsc-dropdown>
                <mbsc-switch [(ngModel)]="mobiDarkSwitch" input-style="box">Switch</mbsc-switch>
                <mbsc-checkbox [(ngModel)]="mobiDarkCheck" input-style="box">Checkbox</mbsc-checkbox>
                <mbsc-slider input-style="box" type="range">Slider</mbsc-slider>
                <mbsc-progress input-style="box" value="50">Progress</mbsc-progress>
                <mbsc-rating input-style="box" type="rating">Rating</mbsc-rating>
            </mbsc-form-group>
        </mbsc-form>
        <mbsc-form theme="mobiscroll-lime" class="mbsc-col-sm-12 mbsc-col-md-4 mbsc-form-box mbsc-form-grid">
            <mbsc-form-group>
                <mbsc-form-group-title><b>Mobiscroll custom theme</b></mbsc-form-group-title>
                <mbsc-input type="text" icon="user4" data-input-style="box" label-style="floating" placeholder="Input with label">Input</mbsc-input>
                <mbsc-textarea input-style="box" label-style="floating" icon="bubble" icon-align="left" placeholder="Textarea with left icon">Textarea</mbsc-textarea>
                <mbsc-dropdown input-style="box" label-style="floating" label="Select">
                    <option value="Opel">Opel</option>
                    <option value="Renault">Renault</option>
                    <option value="Citroen">Citroen</option>
                    <option value="Lotus">Lotus</option>
                </mbsc-dropdown>
                <mbsc-switch [(ngModel)]="mobiCustomSwitch" input-style="box">Switch</mbsc-switch>
                <mbsc-checkbox [(ngModel)]="mobiCustomLightCheck" input-style="box">Checkbox</mbsc-checkbox>
                <mbsc-slider input-style="box" type="range">Slider</mbsc-slider>
                <mbsc-progress input-style="box" value="50">Progress</mbsc-progress>
                <mbsc-rating input-style="box" type="rating">Rating</mbsc-rating>
            </mbsc-form-group>
        </mbsc-form>
    </div>
</div>
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/8 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 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 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/8 or Ionic 2/3/4.

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

Do you need additional support seats?

The license comes with one support seat. ( +$100/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

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 13
Grid layout 7
Image 7
Inputs & fields 6
Listview 19
Measurement 10
Navigation 8
Number 8
Numpad 14
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