Angular and Ionic Grid layout
Grid layout for Angular and Ionic 2/3/4
Grid layout for Angular and Ionic 2/3/4
Grid layout for Angular and Ionic 2/3/4
Mobile first responsive layout built with flexbox. Working with 12 columns across five breakpoints to cover a great variety of screen sizes.
Sizes cover extra small - up to 576 px, small, medium, large and extra large screens - above 1200 px.
Use it to create flexible layouts with the following features:
- Five built-in breakpoints
- Optional fixed width grids
- 12 column grid across all screen sizes for fine grain control
- Vertical and horizontal alignment of columns inside the grid
- Column offsets for precise positioning
- Push and pull for reordering content responsively
- Equal width columns and dynamic width columns
- Future proof built with flexbox
Grid layout demos available for other frameworks.
Viewing demos & code for
Grid layout - Column sizing
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent {}
<mbsc-form class="md-grid-basic">
<mbsc-form-group>
<mbsc-form-group-title>Equal width</mbsc-form-group-title>
<div class="mbsc-grid">
<div class="mbsc-row">
<div class="mbsc-col">1 of 2</div>
<div class="mbsc-col">2 of 2</div>
</div>
<div class="mbsc-row">
<div class="mbsc-col">1 of 4</div>
<div class="mbsc-col">2 of 4</div>
<div class="mbsc-col">3 of 4</div>
<div class="mbsc-col">4 of 4</div>
</div>
</div>
</mbsc-form-group>
<mbsc-form-group>
<mbsc-form-group-title>Specific width</mbsc-form-group-title>
<div class="mbsc-grid">
<div class="mbsc-row">
<div class="mbsc-col-8">col 8</div>
<div class="mbsc-col-4">col 4</div>
</div>
<div class="mbsc-row">
<div class="mbsc-col-3">col 3</div>
<div class="mbsc-col-6">col 6</div>
<div class="mbsc-col-3">col 3</div>
</div>
</div>
</mbsc-form-group>
<mbsc-form-group>
<mbsc-form-group-title>Setting one column</mbsc-form-group-title>
<div class="mbsc-grid">
<div class="mbsc-row">
<div class="mbsc-col-4">col 4</div>
<div class="mbsc-col">col</div>
<div class="mbsc-col">col</div>
<div class="mbsc-col">col</div>
</div>
<div class="mbsc-row">
<div class="mbsc-col">col</div>
<div class="mbsc-col-5">col 5</div>
<div class="mbsc-col">col</div>
</div>
</div>
</mbsc-form-group>
<mbsc-form-group>
<mbsc-form-group-title>Dynamic width</mbsc-form-group-title>
<div class="mbsc-grid mbsc-grid-sm">
<div class="mbsc-row">
<div class="mbsc-col-sm-auto">auto width column</div>
<div class="mbsc-col">col</div>
</div>
<div class="mbsc-row">
<div class="mbsc-col">col</div>
<div class="mbsc-col-sm-auto">auto width column</div>
<div class="mbsc-col">col</div>
</div>
</div>
</mbsc-form-group>
</mbsc-form>
.md-grid-basic [class*="mbsc-col"] {
padding-top: .5em;
padding-bottom: .5em;
background: #cfe0f3;
background-clip: padding-box;
border: 1px solid transparent;
color: #454b50;
}
.md-grid-basic .mbsc-row {
margin: 1em 0;
}
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 { }
Grid layout - Vertical alignment
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent {}
<mbsc-form class="md-grid-vertical">
<mbsc-form-group>
<mbsc-form-group-title>Items aligned to start</mbsc-form-group-title>
<div class="mbsc-grid">
<div class="mbsc-row mbsc-align-items-start">
<div class="mbsc-col">1 of 3</div>
<div class="mbsc-col">2 of 3</div>
<div class="mbsc-col">3 of 3</div>
</div>
</div>
</mbsc-form-group>
<mbsc-form-group>
<mbsc-form-group-title>Items aligned to center</mbsc-form-group-title>
<div class="mbsc-grid">
<div class="mbsc-row mbsc-align-items-center">
<div class="mbsc-col">1 of 3</div>
<div class="mbsc-col">2 of 3</div>
<div class="mbsc-col">3 of 3</div>
</div>
</div>
</mbsc-form-group>
<mbsc-form-group>
<mbsc-form-group-title>Items aligned to end</mbsc-form-group-title>
<div class="mbsc-grid">
<div class="mbsc-row mbsc-align-items-end">
<div class="mbsc-col">1 of 3</div>
<div class="mbsc-col">2 of 3</div>
<div class="mbsc-col">3 of 3</div>
</div>
</div>
</mbsc-form-group>
</mbsc-form>
.md-grid-vertical [class*="mbsc-col"] {
padding-top: .5em;
padding-bottom: .5em;
background: #cfe0f3;
background-clip: padding-box;
border: 1px solid transparent;
color: #454b50;
}
.md-grid-vertical .mbsc-row {
margin: 1em 0;
height: 6em;
padding: 1px;
background: rgba(188, 141, 224, 0.58);
}
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 { }
Grid layout - Horizontal alignment
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent {}
<mbsc-form class="md-grid-horizontal">
<mbsc-form-group>
<mbsc-form-group-title>Justify content to start</mbsc-form-group-title>
<div class="mbsc-grid">
<div class="mbsc-row mbsc-justify-content-start">
<div class="mbsc-col-3">1 of 3</div>
<div class="mbsc-col-3">2 of 3</div>
<div class="mbsc-col-3">3 of 3</div>
</div>
</div>
</mbsc-form-group>
<mbsc-form-group>
<mbsc-form-group-title>Justify content to center</mbsc-form-group-title>
<div class="mbsc-grid">
<div class="mbsc-row mbsc-justify-content-center">
<div class="mbsc-col-3">1 of 3</div>
<div class="mbsc-col-3">2 of 3</div>
<div class="mbsc-col-3">3 of 3</div>
</div>
</div>
</mbsc-form-group>
<mbsc-form-group>
<mbsc-form-group-title>Justify content to end</mbsc-form-group-title>
<div class="mbsc-grid">
<div class="mbsc-row mbsc-justify-content-end">
<div class="mbsc-col-3">1 of 3</div>
<div class="mbsc-col-3">2 of 3</div>
<div class="mbsc-col-3">3 of 3</div>
</div>
</div>
</mbsc-form-group>
<mbsc-form-group>
<mbsc-form-group-title>Justify content around</mbsc-form-group-title>
<div class="mbsc-grid">
<div class="mbsc-row mbsc-justify-content-around">
<div class="mbsc-col-3">1 of 3</div>
<div class="mbsc-col-3">2 of 3</div>
<div class="mbsc-col-3">3 of 3</div>
</div>
</div>
</mbsc-form-group>
<mbsc-form-group>
<mbsc-form-group-title>Justify content between</mbsc-form-group-title>
<div class="mbsc-grid">
<div class="mbsc-row mbsc-justify-content-between">
<div class="mbsc-col-3">1 of 3</div>
<div class="mbsc-col-3">2 of 3</div>
<div class="mbsc-col-3">3 of 3</div>
</div>
</div>
</mbsc-form-group>
</mbsc-form>
.md-grid-horizontal [class*="mbsc-col"] {
padding-top: .5em;
padding-bottom: .5em;
background: #cfe0f3;
background-clip: padding-box;
border: 1px solid transparent;
color: #454b50;
}
.md-grid-horizontal .mbsc-row {
margin: 1em 0;
padding: 1px;
background: rgba(188, 141, 224, 0.58);
}
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 { }
Grid layout - Offsetting columns
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent {}
<mbsc-form class="md-grid-offset">
<mbsc-form-group>
<mbsc-form-group-title>Offsetting columns</mbsc-form-group-title>
<div class="mbsc-grid">
<div class="mbsc-row">
<div class="mbsc-col-4">1 of 2</div>
<div class="mbsc-col-4 mbsc-offset-4">2 of 2</div>
</div>
<div class="mbsc-row">
<div class="mbsc-col-3 mbsc-offset-3">1 of 2</div>
<div class="mbsc-col-3 mbsc-offset-3">2 of 2</div>
</div>
<div class="mbsc-row">
<div class="mbsc-col-6 mbsc-offset-3">1 of 1</div>
</div>
</div>
</mbsc-form-group>
</mbsc-form>
.md-grid-offset [class*="mbsc-col"] {
padding-top: .5em;
padding-bottom: .5em;
background: #cfe0f3;
background-clip: padding-box;
border: 1px solid transparent;
color: #454b50;
}
.md-grid-offset .mbsc-row {
margin: 1em 0;
padding: 1px;
background: rgba(188, 141, 224, 0.58);
}
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 { }
Grid layout - Push and pull
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent {}
<mbsc-form class="md-grid-push-pull">
<div class="mbsc-align-center">
<div class="mbsc-note mbsc-note-primary">You can change the order of the columns with the push and pull attributes.</div>
</div>
<mbsc-form-group>
<mbsc-form-group-title>Push and pull</mbsc-form-group-title>
<div class="mbsc-grid">
<div class="mbsc-row">
<div class="mbsc-col-4 mbsc-push-lg-8">This is the first column</div>
<div class="mbsc-col-8 mbsc-pull-lg-4">This is the second column</div>
</div>
</div>
<div class="mbsc-grid">
<div class="mbsc-row">
<div class="mbsc-col-12 mbsc-col-md-6 mbsc-push-md-6">This is the first column</div>
<div class="mbsc-col-12 mbsc-col-md-6 mbsc-pull-md-6">This is the second column</div>
</div>
</div>
</mbsc-form-group>
</mbsc-form>
.md-grid-push-pull [class*="mbsc-col"] {
padding-top: .5em;
padding-bottom: .5em;
background: #cfe0f3;
background-clip: padding-box;
border: 1px solid transparent;
color: #454b50;
}
.md-grid-push-pull .mbsc-row {
margin: 1em 0;
}
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 { }
Grid layout - Responsive
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent {}
<mbsc-form class="md-grid-responsive">
<mbsc-form-group>
<mbsc-form-group-title>Responsive classes</mbsc-form-group-title>
<div class="mbsc-grid">
<div class="mbsc-row">
<div class="mbsc-col-12 mbsc-col-md-6 mbsc-col-lg-3">Column 1</div>
<div class="mbsc-col-12 mbsc-col-md-6 mbsc-col-lg-3">Column 2</div>
<div class="mbsc-col-12 mbsc-col-md-6 mbsc-col-lg-3">Column 3</div>
<div class="mbsc-col-12 mbsc-col-md-6 mbsc-col-lg-3">Column 4</div>
</div>
</div>
<div class="mbsc-grid">
<div class="mbsc-row">
<div class="mbsc-col">Column 1</div>
<div class="mbsc-col">Column 2</div>
<div class="mbsc-col">Column 3</div>
</div>
</div>
<div class="mbsc-grid">
<div class="mbsc-row">
<div class="mbsc-col-auto">This column has auto-width</div>
<div class="mbsc-col">Second column</div>
</div>
</div>
</mbsc-form-group>
</mbsc-form>
.md-grid-responsive [class*="mbsc-col"] {
padding-top: .5em;
padding-bottom: .5em;
background: #cfe0f3;
border: 1px solid transparent;
background-clip: padding-box;
color: #454b50;
}
.md-grid-responsive .mbsc-row {
margin: 1em 0;
}
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 { }
Grid layout - Fixed width
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent {}
<mbsc-form class="md-grid-fixed">
<mbsc-form-group>
<mbsc-form-group-title>Fixed width layout</mbsc-form-group-title>
<div class="mbsc-grid-fixed">
<div class="mbsc-row">
<div class="mbsc-col">1 of 2</div>
<div class="mbsc-col">2 of 2</div>
</div>
<div class="mbsc-row">
<div class="mbsc-col-3">col 3</div>
<div class="mbsc-col-6">col 6</div>
<div class="mbsc-col-3">col 3</div>
</div>
<div class="mbsc-row">
<div class="mbsc-col-4">col 4</div>
<div class="mbsc-col">col</div>
<div class="mbsc-col">col</div>
<div class="mbsc-col">col</div>
</div>
<div class="mbsc-row">
<div class="mbsc-col-auto">auto width column</div>
<div class="mbsc-col">col</div>
</div>
</div>
</mbsc-form-group>
</mbsc-form>
.md-grid-fixed [class*="mbsc-col"] {
padding-top: .5em;
padding-bottom: .5em;
background: #cfe0f3;
background-clip: padding-box;
border: 1px solid transparent;
color: #454b50;
}
.md-grid-fixed .mbsc-row {
margin: 1em 0;
}
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.
All
Framework license
Get all 36 components, including
Framework license
Get all 36 components, including
- 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
Framework license
Select the development framework you are using. Get all 36 components with the license.
- 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
Select the framework you are interested in
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?
What framework are you using?
We have to set you up with a trial for this to run 👍
Step 1.Install the Mobiscroll CLI from npm
$ 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
$ 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:
Run this command for Ionic 4 & Mobiscroll starter:
Step 3.Copy the code into your app.
Step 4.Run ionic serve in the root folder of your app 🎉
$ ionic serve
And voilà, everything should be running smoothly.
Step 1.Install the Mobiscroll CLI from npm
$ 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
$ 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.
Step 4.Run ng serve in the root folder of your app 🎉
$ ng serve
And voilà, everything should be running smoothly.
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.
$ npm install
$ ionic serve
Let us know if we can help and enjoy!
Your password has been changed!
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.
Extract the zip file and open the demo in your favorite browser.
To install Mobiscroll in your project
follow instructions from this page.
Let us know if we can help and enjoy! 👍
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.
$ npm install
$ ng serve --open
Let us know if we can help and enjoy! 👍
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.
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 demos are using Babel's in-browser ES6 and JSX transformer.
Extract the zip file and open the demo in your browser. To install Mobiscroll in your project
follow instructions from this page.
Let us know if we can help and enjoy! 👍