Adding Angular Material Component to Angular Application Last Updated : 17 Sep, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report Angular Material provides Design Components for Angular. This is build and maintained by Angular Team. This provides the Angular developers with common UI components and tools to help build their own custom components. We as a user can integrate this with our Angular Application using the npm packages provided by them. Angular Material also provides CDK in order to integrate common Interaction patterns. Lists of Some Components provided is: Form ControlNavigationLayoutButton and IndicatorsData TablePopupsModals STEPS TO ADD MATERIAL COMPONENT TO YOUR APPLICATION: Install AngularCreate a Angular CLI ProjectInstall the Angular Material npm package as well as add corresponding angular/cdk because angular material uses it and is dependent on it: npm install --save angular-material npm install --save @angular/cdkThis command will add the latest Angular Material Version package to the project as well as '--save' will add the dependency to package.json file Note if you want to add any specific version to Angular user the command below : npm install --save angular-material@version npm install --save @angular/cdk@versionIn order to use any Component, Import that Component in app.module.ts fileAdd the Imported class to "imports" section in your app.module.ts @NgModule sectionNow, we can start using it in our project. Choose a specific selector for the Material Component. Go to app.component.html file or another template of the component in which you want to add the Material Component, write the selector code to it.Save all the files and then Start the Application using: ng serveThis will reduce your efforts to implement the component right from the base. EXAMPLE OF ADDING CARD COMPONENT TO YOUR ANGULAR PROJECT: Install AngularCreate a new Angular project using: ng new GfGMaterialCardExampleYou will be asked 2 questions as shown below: Would you like to add Angular routing?Which stylesheet format would you like to use? (Use arrow keys)Change the directory level, go to the project folder. cd GfGMaterialCardExampleInstall the Angular Material npm package(@8.0.0 is compatible with Angular 8, Add Angular component based on the Angular Version you are using), Also Install Angular CDK: npm install --save [email protected] npm install --save @angular/cdk@^8.2.3Add the Card Component Import to app.module.ts file as shown below: Remove all the Boilerplate Code in app.component.html File and Add this code: Geeks For Geeks - Angular Material Card Example Add the CSS Code you want to apply in app.component.css file: mat-card { color: green; border:1px solid black; }Start the Application using ng serve command: Comment More infoAdvertise with us Next Article How to use Angular Material in Angular 17? S shantanujoshi Follow Improve Article Tags : AngularJS AngularJS-Misc Similar Reads How to use Angular Material in Angular 17? Angular Material is a comprehensive UI component library designed specifically for Angular applications. With its large collection of pre-built components and seamless integration with Angular, Angular Material simplifies the process of creating visually appealing and responsive user interfaces. In 2 min read Angular Material Toolbar Component Angular Material is a UI component library which is developed by Google so that Angular developers can develop modern applications in a structured and responsive way. By making use of this library, we can greatly increase the user experience of an end-user thereby gaining popularity for our applicat 3 min read Component Communication in Angular Angular, as a robust front-end framework, allows you to build complex and interactive web applications by creating reusable components. One of the key aspects of building such applications is effective communication between these components. There are a lot of instances where we need to transfer dat 12 min read What are angular Material Icons ? Angular Material is a UI component library which is developed by Google so that Angular developers can develop modern applications in a structured and responsive way. By making use of this library, we can greatly increase the user experience of an end-user thereby gaining popularity for our applicat 3 min read Angular Material Installation Angular Material is a popular UI framework for building user interfaces with the Material Design style, widely used by web developers around the world. It is a set of reusable UI components and guidelines for building web applications with the Material Design language, which is developed by Google. 5 min read How to display data obtained from an API to Angular Material Card ? Angular Material is a UI component library that is developed by Google so that Angular developers can develop modern applications in a structured and responsive way. In this article, we will learn How to display data that is obtained from an API to a card of Angular Material. Steps for Installing 3 min read Like