What is @angular/material?
The @angular/material package is a UI component library for Angular applications that implements Google's Material Design. It provides a wide range of reusable UI components that are designed to be efficient, accessible, and visually appealing. These components help developers build cohesive, attractive, and functional web applications with less effort.
What are @angular/material's main functionalities?
Form Controls
Form controls are essential for collecting input from the user. @angular/material provides various form controls like input fields, checkboxes, radio buttons, and select dropdowns. The code sample demonstrates how to import and use the MatInputModule for text inputs.
import {MatInputModule} from '@angular/material/input';
@NgModule({
imports: [MatInputModule]
})
export class MyModule {}
Navigation
Navigation components help users move through the application. This includes menus, side navigation, and toolbars. The code sample shows how to import the MatToolbarModule to use a Material Design toolbar in your application.
import {MatToolbarModule} from '@angular/material/toolbar';
@NgModule({
imports: [MatToolbarModule]
})
export class MyModule {}
Layout
Layout components assist in structuring the view of an application. @angular/material offers grid lists, cards, and tabs to help organize content. The code sample illustrates the use of MatGridListModule for creating grid layouts.
import {MatGridListModule} from '@angular/material/grid-list';
@NgModule({
imports: [MatGridListModule]
})
export class MyModule {}
Buttons & Indicators
Buttons and indicators are used for actions and status feedback. This category includes buttons, progress bars, and spinner indicators. The code sample demonstrates importing MatButtonModule to use Material Design buttons.
import {MatButtonModule} from '@angular/material/button';
@NgModule({
imports: [MatButtonModule]
})
export class MyModule {}
Other packages similar to @angular/material
ngx-bootstrap
ngx-bootstrap provides Bootstrap components powered by Angular. It's similar to @angular/material in providing a set of reusable UI components but is based on Bootstrap's design system rather than Material Design.
primeng
PrimeNG is a collection of rich UI components for Angular. It offers a wide range of widgets and is comparable to @angular/material in terms of providing components for form controls, tables, overlays, and more. PrimeNG is known for its extensive component library beyond what @angular/material offers.
ng-zorro-antd
NG-ZORRO is an Angular UI library based on Ant Design. Similar to @angular/material, it provides a comprehensive suite of UI components that are designed to be modular, lightweight, and easy to use. It differs in its design philosophy, following Ant Design principles instead of Material Design.
Material Design for Angular
This is the home for the Angular team's Material Design components built on top of Angular.
Quick links
Google group,
Contributing,
Plunker Template
Installation
The latest release of Angular Material can be installed from npm
npm install --save @angular/material
Playing with the latest changes from master is also possible
npm install --save https://github.com/angular/material2-builds.git
Getting started
See our Getting Started Guide
if you're building your first project with Angular Material.
Project status
Angular Material is currently in beta and under active development.
During beta, new features will be added regularly and APIs will evolve based on user feedback.
Check out our directory of design documents
for more insight into our process.
If you'd like to contribute, you must follow our contributing guidelines.
You can look through the issues (which should be up-to-date on who is working on which features
and which pieces are blocked) and make a comment.
Also see our Good for community contribution
label.
High level items planned for January 2017:
- Initial version of md-autocomplete
- Prototyping for data-table
- Improvements to https://material.angular.io
- Continued expanding e2e test coverage
- More work on scroll / resize handling for overlays
- Screenshot tests
- Better development automation
Feature status:
"Available" means that the components or feature is published and available for use, but may still
be missing some behaviors or polish.
The goal of Angular Material
Our goal is to build a set of high-quality UI components built with Angular and TypeScript,
following the Material Design spec. These
components will serve as an example of how to write Angular code following best practices.
What do we mean by "high-quality"?
- Internationalized and accessible so that all users can use them.
- Straightforward APIs that don't confuse developers.
- Behave as expected across a wide variety of use-cases without bugs.
- Behavior is well-tested with both unit and integration tests.
- Customizable within the bounds of the Material Design specification.
- Performance cost is minimized.
- Code is clean and well-documented to serve as an example for Angular devs.
Browser and screen reader support
Angular Material supports the most recent two versions of all major browsers:
Chrome (including Android), Firefox, Safari (including iOS), and IE11 / Edge
We also aim for great user experience with the following screen readers:
- NVDA and JAWS with IE / FF / Chrome (on Windows).
- VoiceOver with Safari on iOS and Safari / Chrome on OSX.
- TalkBack with Chrome on Android.