Angular Material Design Components For Angular
This library provides your Angular Application with material components. To get started you need to add Angular Material, Angular CDK and Angular Animations You can use either the `npm` or `yarn` command-line tool to install packages. Use whichever is appropriate for your project in the examples below.
npm install --save @angular/material @angular/cdk @angular/animations or yarn add @angular/material @angular/cdk @angular/animations
For Angular 6+ Applications, there is even an easier way to add this module to your app. Using the Angular CLI ng add command will update your Angular project with the correct dependencies, perform configuration changes and execute initialization code.
ng add @angular/material
That's it. All you need to do next is configure animations: import to enable animations. `BrowserAnimationsModule`
import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; @NgModule({ ... imports: [BrowserAnimationsModule], ... }) export class AppModule { }
To disable animations, you should import `NoopAnimationsModule`.
import {NoopAnimationsModule} from '@angular/platform-browser/animations'; @NgModule({ ... imports: [NoopAnimationsModule], ... }) export class AppModule { }
All you need to do next is import the modules you need
import {MatButtonModule, MatCheckboxModule} from '@angular/material'; @NgModule({ ... imports: [MatButtonModule, MatCheckboxModule], ... }) export class FeatureAppModule { }
For more, go here: https://material.angular.io/guide/getting-started